Code

configure.ac: enable automake silent-rules
[ncmpc.git] / src / screen_find.c
index c17db4d3354652743af1f6f13234af1a7c62d707..3fdf9f30dd923914723c2e85658161e95a8a322f 100644 (file)
@@ -19,7 +19,7 @@
 
 #include "screen_find.h"
 #include "screen_utils.h"
-#include "screen_message.h"
+#include "screen_status.h"
 #include "screen.h"
 #include "i18n.h"
 #include "options.h"
@@ -30,7 +30,7 @@
 #define JUMP_PROMPT _("Jump")
 
 /* query user for a string and find it in a list window */
-int
+bool
 screen_find(struct list_window *lw, command_t findcmd,
            list_window_callback_fn_t callback_fn,
            void *callback_data)
@@ -114,7 +114,7 @@ screen_jump(struct list_window *lw,
        while(1) {
                key = screen_getch(screen.findbuf);
                /* if backspace or delete was pressed, process instead of ending loop */
-               if (key == 127 || key == 330) {
+               if (key == KEY_BACKSPACE || key == KEY_DC) {
                        int i;
                        if (search_str <= g_utf8_find_prev_char(screen.findbuf, iter))
                                iter = g_utf8_find_prev_char(screen.findbuf, iter);