Code

screen_utils: Fixed a minor bug with the jump command.
authorPatrick Hallen <patrick.hallen@rwth-aachen.de>
Sun, 15 Mar 2009 23:34:56 +0000 (00:34 +0100)
committerPatrick Hallen <patrick.hallen@rwth-aachen.de>
Sun, 15 Mar 2009 23:34:56 +0000 (00:34 +0100)
When pressing delete J was printed in the jump input. Now pressing delete,
removes the last character.

src/screen_utils.c

index 53b6b0f8ac357e148f4dc6083d6f9450a0ff8ee5..971b8838b8bc27aab4690285fd4c42651bca5d48 100644 (file)
@@ -242,8 +242,8 @@ screen_jump(struct list_window *lw,
        /* unfortunately wgetch returns "next/previous-page" not as an ascii-char */
        while(!g_ascii_iscntrl(key) && key != KEY_NPAGE && key != KEY_PPAGE) {
                key = screen_getch(screen.status_window.w, screen.findbuf);
-               /* if backspace was pressed */
-               if (key == KEY_BACKSPACE) {
+               /* if backspace or delete was pressed */
+               if (key == KEY_BACKSPACE || key == 330) {
                        /* don't end the loop */
                        key = 65;
                        if (search_str <= g_utf8_find_prev_char(screen.findbuf, iter))