mirror of
https://github.com/MidnightCommander/mc
synced 2025-02-10 12:24:25 +03:00
Fix %f macto in mcedit user menu.
In mcedit user menu the %f macro should match the file name opened in mcedit not the file name is selected in the panel. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
680678ef72
commit
f89fff139c
@ -747,15 +747,23 @@ expand_format (const WEdit * edit_widget, char c, gboolean do_quote)
|
||||
switch (mc_global.mc_run_mode)
|
||||
{
|
||||
case MC_RUN_FULL:
|
||||
if (g_ascii_islower ((gchar) c))
|
||||
panel = current_panel;
|
||||
#ifdef USE_INTERNAL_EDIT
|
||||
if (edit_widget != NULL)
|
||||
fname = edit_get_file_name (edit_widget);
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (get_other_type () != view_listing)
|
||||
return g_strdup ("");
|
||||
panel = other_panel;
|
||||
if (g_ascii_islower ((gchar) c))
|
||||
panel = current_panel;
|
||||
else
|
||||
{
|
||||
if (get_other_type () != view_listing)
|
||||
return g_strdup ("");
|
||||
panel = other_panel;
|
||||
}
|
||||
|
||||
fname = panel->dir.list[panel->selected].fname;
|
||||
}
|
||||
fname = panel->dir.list[panel->selected].fname;
|
||||
break;
|
||||
|
||||
#ifdef USE_INTERNAL_EDIT
|
||||
|
Loading…
x
Reference in New Issue
Block a user