diff --git a/src/Makefile b/src/Makefile index 05be0599..f927d9e3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -3,7 +3,7 @@ objects := $(sources:.cc=.o) deps := $(addprefix ., $(sources:.cc=.d)) CXXFLAGS += -std=c++0x -g -Wall -Wno-reorder -Wno-sign-compare -LDFLAGS += -lmenu -lncurses -lboost_regex +LDFLAGS += -lmenu -lncursesw -lboost_regex kak : $(objects) $(CXX) $(LDFLAGS) $(CXXFLAGS) $(objects) -o $@ diff --git a/src/ncurses.cc b/src/ncurses.cc index 47972fff..2b7da02c 100644 --- a/src/ncurses.cc +++ b/src/ncurses.cc @@ -138,9 +138,7 @@ using Utf8Policy = utf8::InvalidBytePolicy::Pass; using Utf8Iterator = utf8::utf8_iterator; void addutf8str(WINDOW* win, Utf8Iterator begin, Utf8Iterator end) { - assert(begin <= end); - while (begin != end) - waddch(win, *begin++); + waddstr(win, std::string(begin.underlying_iterator(), end.underlying_iterator()).c_str()); } static DisplayCoord window_size(WINDOW* win) diff --git a/src/ncurses.hh b/src/ncurses.hh index 32cee4cb..38a29aed 100644 --- a/src/ncurses.hh +++ b/src/ncurses.hh @@ -1,8 +1,8 @@ #ifndef ncurses_hh_INCLUDED #define ncurses_hh_INCLUDED -#include -#include +#include +#include #include "user_interface.hh" #include "display_buffer.hh"