aboutsummaryrefslogtreecommitdiff
path: root/sam.c
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-05-26 18:28:41 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-05-26 19:28:41 +0200
commit3032669cd9bf8d2a564f9eb37bc9a58bbb317314 (patch)
tree511b229fa6ca73ee3d688665203d100ec2a8b4d6 /sam.c
parenta338f4fd81a00c14f416f4bfa004583e5ede18c5 (diff)
downloadvis-3032669cd9bf8d2a564f9eb37bc9a58bbb317314.tar.gz
vis-3032669cd9bf8d2a564f9eb37bc9a58bbb317314.tar.xz
vis: use normalized absolute file names as internal representation
Try to display a shorthand version in the status bar, this currently only works for files below the current working directory of the editor process.
Diffstat (limited to 'sam.c')
-rw-r--r--sam.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sam.c b/sam.c
index 717b380..0c1ffee 100644
--- a/sam.c
+++ b/sam.c
@@ -1102,10 +1102,8 @@ static bool cmd_write(Vis *vis, Win *win, Command *cmd, const char *argv[], Curs
return false;
}
- if (!file->name) {
- vis_window_name(win, *name);
- file->name = win->file->name;
- }
+ if (!file->name)
+ file_name_set(file, *name);
if (strcmp(file->name, *name) == 0)
file->stat = text_stat(text);
if (vis->event && vis->event->file_save)