From: Patrick Hallen Date: Sun, 15 Mar 2009 23:34:56 +0000 (+0100) Subject: screen_utils: Fixed a minor bug with the jump command. X-Git-Tag: release-0.14~59 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2236f0c6ea2f529e0d5a8a6df7bcd1838c1c9fb1;p=ncmpc.git screen_utils: Fixed a minor bug with the jump command. When pressing delete J was printed in the jump input. Now pressing delete, removes the last character. --- diff --git a/src/screen_utils.c b/src/screen_utils.c index 53b6b0f..971b883 100644 --- a/src/screen_utils.c +++ b/src/screen_utils.c @@ -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))