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-utils.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/interface-curses/curses-utils.h') diff --git a/src/interface-curses/curses-utils.h b/src/interface-curses/curses-utils.h index 18cdd3d..c63c747 100644 --- a/src/interface-curses/curses-utils.h +++ b/src/interface-curses/curses-utils.h @@ -20,6 +20,9 @@ #include +/** what is displayed for unnamed buffers in the info line and popups */ +#define TECO_UNNAMED_FILE "(Unnamed)" + guint teco_curses_format_str(WINDOW *win, const gchar *str, gsize len, gint max_width); guint teco_curses_format_filename(WINDOW *win, const gchar *filename, gint max_width); -- cgit v1.2.3