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. --- vis-lua.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'vis-lua.c') diff --git a/vis-lua.c b/vis-lua.c index 3a4f0dd..5aff161 100644 --- a/vis-lua.c +++ b/vis-lua.c @@ -41,7 +41,7 @@ static void window_status_update(Vis *vis, Win *win) { int width = vis_window_width_get(win); enum UiOption options = view_options_get(view); bool focused = vis->win == win; - const char *filename = file->name; + const char *filename = file_name_get(file); const char *mode = vis->mode->status; if (focused && mode) @@ -1066,7 +1066,7 @@ static int file_index(lua_State *L) { if (lua_isstring(L, 2)) { const char *key = lua_tostring(L, 2); if (strcmp(key, "name") == 0) { - lua_pushstring(L, file->name); + lua_pushstring(L, file_name_get(file)); return 1; } -- cgit v1.2.3