From 3298624b5352153ffca5543ec4aaee2747d8eb13 Mon Sep 17 00:00:00 2001 From: Matt Portas Date: Thu, 28 Jan 2010 20:38:28 +0100 Subject: [PATCH] screen_find: strip prompt from search string The jump prompt was left at the start of the search string. This patch removes this. --- src/screen_find.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } -- 2.30.2