From: Matt Portas Date: Thu, 28 Jan 2010 19:38:28 +0000 (+0100) Subject: screen_find: strip prompt from search string X-Git-Tag: release-0.17~18 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3298624b5352153ffca5543ec4aaee2747d8eb13;p=ncmpc.git screen_find: strip prompt from search string The jump prompt was left at the start of the search string. This patch removes this. --- diff --git a/src/screen_find.c b/src/screen_find.c index 0d9d51f..c17db4d 100644 --- a/src/screen_find.c +++ b/src/screen_find.c @@ -96,7 +96,7 @@ screen_jump(struct list_window *lw, list_window_paint_callback_t paint_callback, void *callback_data) { - char *search_str, *iter; + char *search_str, *iter, *temp; const int WRLN_MAX_LINE_SIZE = 1024; int key = 65; command_t cmd; @@ -145,4 +145,8 @@ screen_jump(struct list_window *lw, ungetch(key); if ((cmd=get_keyboard_command()) != CMD_NONE) do_input_event(cmd); + + temp = g_strdup(search_str); + g_free(screen.findbuf); + screen.findbuf = temp; }