Ticket #2266: filtered view default text

I suggest changing default text in filtered view (alt-!) command input line
instead current filename in panel to contents of cmdline.

It's easier to edit command line with commands like alt-tab,
alt-enter, etc., and then view the result in mcview.

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
This commit is contained in:
Anton Novosyolov 2011-01-05 14:17:37 +02:00 committed by Slava Zanko
parent 38b3740d10
commit a30cf7e980

View File

@ -721,11 +721,17 @@ void
filtered_view_cmd (void)
{
char *command;
const char *initial_command;
if (cmdline->buffer[0] == '\0')
initial_command = selection (current_panel)->fname;
else
initial_command = cmdline->buffer;
command =
input_dialog (_("Filtered view"),
_("Filter command and arguments:"),
MC_HISTORY_FM_FILTERED_VIEW, selection (current_panel)->fname);
MC_HISTORY_FM_FILTERED_VIEW, initial_command);
if (command != NULL)
{