From 71766856901c85ccb087219b7ec2e6daf01d586d Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Fri, 3 Apr 2015 13:10:46 +0100 Subject: [PATCH] Avoid zstr call in ncurses addutf8str --- src/ncurses_ui.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc index 7d6a3d30..7d94d08c 100644 --- a/src/ncurses_ui.cc +++ b/src/ncurses_ui.cc @@ -305,7 +305,7 @@ using Utf8Policy = utf8::InvalidPolicy::Pass; using Utf8Iterator = utf8::iterator; void addutf8str(WINDOW* win, Utf8Iterator begin, Utf8Iterator end) { - waddstr(win, StringView(begin.base(), end.base()).zstr()); + waddnstr(win, begin.base(), end.base() - begin.base()); } static CharCoord window_size(WINDOW* win)