From f1f32f9b407f8218020871ac4aba17209f8eadd4 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Tue, 17 Jun 2014 20:05:21 -0400 Subject: [PATCH] Fix readline prompt to correctly handle UTF-8 characters --- NEWS.adoc | 3 +++ src/prompt.c | 6 +----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/NEWS.adoc b/NEWS.adoc index 474581c..2e3043f 100644 --- a/NEWS.adoc +++ b/NEWS.adoc @@ -12,6 +12,9 @@ Improvement: Bug fixes: + - Fix readline completion. + - Fix '/' to `find-next` when readline support is enabled. (GH #302) + - Fix readline prompt to correctly handle UTF-8 characters. - Add warnings for more obsolete actions and colors. - Fix passing of commit IDS via stdin to the main view. diff --git a/src/prompt.c b/src/prompt.c index a872d41..332029c 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -178,11 +178,7 @@ read_prompt_incremental(const char *prompt, bool edit_mode, input_handler handle static void readline_display(void) { - wmove(status_win, 0, 0); - waddstr(status_win, rl_display_prompt); - waddstr(status_win, rl_line_buffer); - wclrtoeol(status_win); - wmove(status_win, 0, strlen(rl_display_prompt) + rl_point); + update_status("%s%s", rl_display_prompt, rl_line_buffer); wrefresh(status_win); } -- 2.11.4.GIT