From 0c89fb700957e411885e7e7835e15f441e8b5e84 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 23 Dec 2025 13:54:17 +0100 Subject: fixed clicking the "(Unnamed)" buffer in 0EB popups * When constructing the list of popup items, the unnamed buffer is stored as the empty string instead of a prerendered "(Unnamed)". Using the empty string simplifies autocompletions, which will actually have to insert nothing at all (in addition to terminating the string). * Since unnamed buffers are now special in the popup list, we can render them with special icons as well. Currently, only on Curses we use a file symbol with a question mark. There doesn't appear to be a fitting standard Freedesktop icon to use on GTK and there isn't even any fitting standard emblem to lay over the default file icon. --- src/interface-curses/curses-icons.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/interface-curses/curses-icons.c') diff --git a/src/interface-curses/curses-icons.c b/src/interface-curses/curses-icons.c index 7c021d6..d932104 100644 --- a/src/interface-curses/curses-icons.c +++ b/src/interface-curses/curses-icons.c @@ -362,6 +362,10 @@ teco_curses_icon_cmp(const void *a, const void *b) gunichar teco_curses_icons_lookup_file(const gchar *filename) { + if (!filename || !*filename) + /* "(Unnamed)" file */ + return 0xf1036; /* 󱀶 */ + g_autofree gchar *basename = g_path_get_basename(filename); const teco_curses_icon_t *icon; -- cgit v1.2.3