Skip to content

Commit

Permalink
Ticket #4636: fails to read directory if resized while external edito…
Browse files Browse the repository at this point in the history
…r 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]>
  • Loading branch information
aborodin committed Feb 14, 2025
1 parent f2b4828 commit 213119c
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/filemanager/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,13 +642,13 @@ view_filtered_cmd (const WPanel *panel)
void
edit_file_at_line (const vfs_path_t *what_vpath, gboolean internal, long start_line)
{

#ifdef USE_INTERNAL_EDIT
if (internal)
{
const edit_arg_t arg = { (vfs_path_t *) what_vpath, start_line };

edit_file (&arg);
dialog_switch_process_pending ();
}
else
#endif
Expand All @@ -666,16 +666,6 @@ edit_file_at_line (const vfs_path_t *what_vpath, gboolean internal, long start_l

execute_external_editor_or_viewer (editor, what_vpath, start_line);
}

if (mc_global.mc_run_mode == MC_RUN_FULL)
update_panels (UP_OPTIMIZE, UP_KEEPSEL);

#ifdef USE_INTERNAL_EDIT
if (use_internal_edit)
dialog_switch_process_pending ();
else
#endif
repaint_screen ();
}

/* --------------------------------------------------------------------------------------------- */
Expand Down

0 comments on commit 213119c

Please sign in to comment.