X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fscreen_find.c;h=b838421f4f94eadae78b382a7f086ec656f44925;hb=d50894768e12b434092ba2fc8bb88b4d0b816ef8;hp=a08140c670907fcc5fa88e14ec6d0e92a7c6012f;hpb=855877ffd473227827563c327763175dd463474b;p=ncmpc.git diff --git a/src/screen_find.c b/src/screen_find.c index a08140c..b838421 100644 --- a/src/screen_find.c +++ b/src/screen_find.c @@ -1,5 +1,5 @@ /* 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 @@ -21,6 +21,7 @@ #include "screen_utils.h" #include "screen_status.h" #include "screen.h" +#include "keyboard.h" #include "i18n.h" #include "options.h" #include "ncmpc.h" @@ -139,14 +140,10 @@ screen_jump(struct list_window *lw, 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); }