Skip to content

Commit 213119c

Browse files
committed
Ticket #4636: fails to read directory if resized while external editor was running.
* (edit_file_at_line): simplify. Make this function like view_file_at_line(). Get rid of multiple directory readings after close an external editor. Signed-off-by: Andrew Borodin <[email protected]>
1 parent f2b4828 commit 213119c

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/filemanager/cmd.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -642,13 +642,13 @@ view_filtered_cmd (const WPanel *panel)
642642
void
643643
edit_file_at_line (const vfs_path_t *what_vpath, gboolean internal, long start_line)
644644
{
645-
646645
#ifdef USE_INTERNAL_EDIT
647646
if (internal)
648647
{
649648
const edit_arg_t arg = { (vfs_path_t *) what_vpath, start_line };
650649

651650
edit_file (&arg);
651+
dialog_switch_process_pending ();
652652
}
653653
else
654654
#endif
@@ -666,16 +666,6 @@ edit_file_at_line (const vfs_path_t *what_vpath, gboolean internal, long start_l
666666

667667
execute_external_editor_or_viewer (editor, what_vpath, start_line);
668668
}
669-
670-
if (mc_global.mc_run_mode == MC_RUN_FULL)
671-
update_panels (UP_OPTIMIZE, UP_KEEPSEL);
672-
673-
#ifdef USE_INTERNAL_EDIT
674-
if (use_internal_edit)
675-
dialog_switch_process_pending ();
676-
else
677-
#endif
678-
repaint_screen ();
679669
}
680670

681671
/* --------------------------------------------------------------------------------------------- */

0 commit comments

Comments
 (0)