aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vis-cmds.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index 11a92dc..18169f5 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -321,8 +321,13 @@ static bool cmd_edit(Vis *vis, Win *win, Command *cmd, const char *argv[], Curso
info_unsaved_changes(vis);
return false;
}
- if (!argv[1])
+ if (!argv[1]) {
+ if (oldwin->file->refcount > 1) {
+ vis_info_show(vis, "Can not reload file being opened multiple times");
+ return false;
+ }
return vis_window_reload(oldwin);
+ }
if (!openfiles(vis, &argv[1]))
return false;
if (vis->win != oldwin) {