(midnight_callback): don't execute command line from 'Quick view' panel.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2015-01-26 13:43:55 +03:00
parent 8469c13f38
commit 2680f60772

View File

@ -1460,6 +1460,16 @@ midnight_callback (Widget * w, Widget * sender, widget_msg_t msg, int parm, void
{
size_t i;
/* HACK: don't execute command in the command line if Enter was pressed
in the quick viewer panel. */
/* TODO: currently, when one of panels is other than view_listing,
current_panel points to view_listing panel all time independently of
it's activity. Thus, we can't use get_current_type() here.
current_panel should point to actualy current active panel
independently of it's type. */
if (current_panel->active == 0 && get_other_type () == view_quick)
return MSG_NOT_HANDLED;
for (i = 0; cmdline->buffer[i] != '\0' &&
(cmdline->buffer[i] == ' ' || cmdline->buffer[i] == '\t'); i++)
;