Code

screen_find: strip prompt from search string
authorMatt Portas <matt.r.portas@gmail.com>
Thu, 28 Jan 2010 19:38:28 +0000 (20:38 +0100)
committerMax Kellermann <max@duempel.org>
Thu, 28 Jan 2010 19:50:20 +0000 (20:50 +0100)
The jump prompt was left at the start of the search string.  This
patch removes this.

src/screen_find.c

index 0d9d51f0d2ce959f4e5d53dac032ac8811694be7..c17db4d3354652743af1f6f13234af1a7c62d707 100644 (file)
@@ -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;
 }