aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis.c')
-rw-r--r--vis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vis.c b/vis.c
index 38cd0dd..753ddf6 100644
--- a/vis.c
+++ b/vis.c
@@ -1698,10 +1698,10 @@ static bool cmd_write(Filerange *range, enum CmdOpt opt, const char *argv[]) {
editor_info_show(vis, "Can't write `%s'", *name);
return false;
}
- if (!file->name) {
+ if (!file->name)
editor_window_name(vis->win, *name);
+ if (strcmp(file->name, *name) == 0)
file->stat = text_stat(text);
- }
}
return true;
}