diff --git a/src/filemanager/cmd.c b/src/filemanager/cmd.c
index 76f21acdb..4f2fa6493 100644
a
|
b
|
|
69 | 69 | #include "src/history.h" |
70 | 70 | #include "src/usermenu.h" /* MC_GLOBAL_MENU */ |
71 | 71 | #include "src/util.h" /* check_for_default() */ |
| 72 | #include "src/args.h" /* mcedit_arg_t */ |
72 | 73 | |
73 | 74 | #include "src/viewer/mcviewer.h" |
74 | 75 | |
… |
… |
void |
699 | 700 | edit_cmd (const WPanel * panel) |
700 | 701 | { |
701 | 702 | vfs_path_t *fname; |
702 | | |
703 | | fname = vfs_path_from_str (panel_current_entry (panel)->fname->str); |
704 | | if (regex_command (fname, "Edit") == 0) |
705 | | do_edit (fname); |
706 | | vfs_path_free (fname, TRUE); |
| 703 | if (panel->marked != 0) |
| 704 | { |
| 705 | int i; |
| 706 | GList *files = NULL; |
| 707 | mcedit_arg_t *arg; |
| 708 | for (i = 0; i < panel->dir.len; i++) |
| 709 | { |
| 710 | if (panel->dir.list[i].f.marked != 0) |
| 711 | { |
| 712 | arg = g_new (mcedit_arg_t, 1); |
| 713 | arg->file_vpath = vfs_path_from_str (panel->dir.list[i].fname->str); |
| 714 | arg->line_number = 0; |
| 715 | files = g_list_prepend (files, arg); |
| 716 | } |
| 717 | } |
| 718 | edit_files (files); |
| 719 | g_list_free_full (files, mcedit_arg_free); |
| 720 | } |
| 721 | else |
| 722 | { |
| 723 | fname = vfs_path_from_str (panel_current_entry (panel)->fname->str); |
| 724 | if (regex_command (fname, "Edit") == 0) |
| 725 | do_edit (fname); |
| 726 | vfs_path_free (fname, TRUE); |
| 727 | } |
707 | 728 | } |
708 | 729 | |
709 | 730 | /* --------------------------------------------------------------------------------------------- */ |