aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-curses/curses-utils.h
diff options
context:
space:
mode:
authorRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-23 13:54:17 +0100
committerRobin Haberkorn <rhaberkorn@fmsbw.de>2025-12-23 13:54:17 +0100
commit0c89fb700957e411885e7e7835e15f441e8b5e84 (patch)
tree56d756d6fa1923a5198504a322ec9c67cf274922 /src/interface-curses/curses-utils.h
parent2592ef74ab2eba57c32fe21993ce01e9698b106f (diff)
fixed clicking the "(Unnamed)" buffer in 0EB popupsHEADmaster-fmsbw-cimaster
* 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.
Diffstat (limited to 'src/interface-curses/curses-utils.h')
-rw-r--r--src/interface-curses/curses-utils.h3
1 files changed, 3 insertions, 0 deletions
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 <curses.h>
+/** 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);