aboutsummaryrefslogtreecommitdiff
path: root/vis.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2015-07-10 15:39:31 +0200
committerMarc André Tanner <mat@brain-dump.org>2015-07-10 15:39:31 +0200
commit29b718e1d2b94f95281911c80ec5460cbd7fc526 (patch)
tree6b822360c6856703952f596f8c70f0b5a54da12e /vis.c
parent8275230764deae7d708818ad565a9560f89ad6af (diff)
downloadvis-29b718e1d2b94f95281911c80ec5460cbd7fc526.tar.gz
vis-29b718e1d2b94f95281911c80ec5460cbd7fc526.tar.xz
vis: fix detection of file changes outside the editor
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;
}