diff --git a/src/screen_find.c b/src/screen_find.c
index f131af72d482e0d52114c1b5c34b26b02f4839e8..b838421f4f94eadae78b382a7f086ec656f44925 100644 (file)
--- a/src/screen_find.c
+++ b/src/screen_find.c
/* ncmpc (Ncurses MPD Client)
- * (c) 2004-2010 The Music Player Daemon Project
+ * (c) 2004-2017 The Music Player Daemon Project
* Project homepage: http://musicpd.org
*
* This program is free software; you can redistribute it and/or modify
#include "screen_utils.h"
#include "screen_status.h"
#include "screen.h"
+#include "keyboard.h"
#include "i18n.h"
#include "options.h"
#include "ncmpc.h"
if (screen.findbuf) {
g_free(screen.findbuf);
screen.findbuf=NULL;
- }
- /* continue... */
+ }
+ /* fall through */
case CMD_LIST_FIND_NEXT:
case CMD_LIST_RFIND_NEXT:
wrefresh(lw->w);
}
- /* ncmpc should get the command */
- ungetch(key);
-
- command_t cmd;
- if ((cmd=get_keyboard_command()) != CMD_NONE)
- do_input_event(cmd);
-
char *temp = g_strdup(search_str);
g_free(screen.findbuf);
screen.findbuf = temp;
+
+ /* ncmpc should get the command */
+ keyboard_unread(key);
}