From 3032669cd9bf8d2a564f9eb37bc9a58bbb317314 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Thu, 26 May 2016 18:28:41 +0100 Subject: 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. --- sam.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sam.c') 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) -- cgit v1.2.3