(put_tagged): trivial refactoring.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2024-02-18 12:51:19 +03:00
parent 41fadeffe7
commit 8bb12a40e6

View File

@ -787,8 +787,12 @@ put_tagged (WPanel * panel)
{ {
if (!command_prompt) if (!command_prompt)
return; return;
input_disable_update (cmdline); input_disable_update (cmdline);
if (panel->marked)
if (panel->marked == 0)
command_insert (cmdline, panel_current_entry (panel)->fname->str, TRUE);
else
{ {
int i; int i;
@ -796,8 +800,6 @@ put_tagged (WPanel * panel)
if (panel->dir.list[i].f.marked != 0) if (panel->dir.list[i].f.marked != 0)
command_insert (cmdline, panel->dir.list[i].fname->str, TRUE); command_insert (cmdline, panel->dir.list[i].fname->str, TRUE);
} }
else
command_insert (cmdline, panel_current_entry (panel)->fname->str, TRUE);
input_enable_update (cmdline); input_enable_update (cmdline);
} }