diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-29 17:51:49 -0500 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2021-01-29 17:51:49 -0500 |
commit | a0b84cc8f40e19a506332be3a05222b87e6ed617 (patch) | |
tree | 68607facee3bb655cfe2166d4a578db9e91bdf1f /menu.c | |
parent | 565b5e619ed64f459f1b38b5b94bb72b5b9a714f (diff) |
better tab bar, default to "save as" on Ctrl+S with starting buffer
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -125,11 +125,11 @@ static void menu_render(Ted *ted, Menu menu) { glEnd(); if (*ted->warn_overwrite) { - char const *filename = ted->warn_overwrite; + char const *path = ted->warn_overwrite; + char const *filename = path_filename(path); char title[32] = {0}, body[256] = {0}; - char const *last_path_sep = strrchr(filename, PATH_SEPARATOR); - strbuf_printf(title, "Overwrite %s?", last_path_sep ? last_path_sep + 1 : filename); - strbuf_printf(body, "Are you sure you want to overwrite %s?", ted->warn_overwrite); + strbuf_printf(title, "Overwrite %s?", filename); + strbuf_printf(body, "Are you sure you want to overwrite %s?", path); popup_render(ted, title, body); return; } |