diff options
| author | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-01-30 14:22:59 +0100 |
|---|---|---|
| committer | Robin Haberkorn <rhaberkorn@fmsbw.de> | 2026-01-30 14:36:20 +0100 |
| commit | e624826447d83f1b79e5442d3695a7528cf578cf (patch) | |
| tree | 9e008039f1db26974d650e26a2f099b91e690e65 /src/interface-curses/curses-utils.h | |
| parent | 7fa9feae452ea05a083b17d3f0cdf69bf5d37822 (diff) | |
fixup: high-color-pair support was still broken in ScintermHEADmaster-fmsbw-cimaster
* Also updated A_XXX attributes to WA_XXX, where the "new" wattr_set() APIs
are used. This doesn't make a difference on ncurses and PDCurses, but the
X/Open standard demands it.
* Allow color pairs up to 32767 instead of only up to 32766.
* We now always require Curses wide-character APIs due to Scinterm,
which has to use mvwin_wch(). We were practically depending on wide-character
support anyway, so this shouldn't really restrict portability.
* teco_curses_add_wc() has been simplified, now that we can rely on
wide-char APIs. Perhaps it should be removed altogether?
Diffstat (limited to 'src/interface-curses/curses-utils.h')
| -rw-r--r-- | src/interface-curses/curses-utils.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/interface-curses/curses-utils.h b/src/interface-curses/curses-utils.h index 97fc1cc..c6d9d8d 100644 --- a/src/interface-curses/curses-utils.h +++ b/src/interface-curses/curses-utils.h @@ -27,15 +27,12 @@ guint teco_curses_format_str(WINDOW *win, const gchar *str, gsize len, gint max_ guint teco_curses_format_filename(WINDOW *win, const gchar *filename, gint max_width); -/** - * Add Unicode character to window. - * This is just like wadd_wch(), but does not require wide-char APIs. - */ +/** Add Unicode character to window. */ static inline void teco_curses_add_wc(WINDOW *win, gunichar chr) { - gchar buf[6]; - waddnstr(win, buf, g_unichar_to_utf8(chr, buf)); + wchar_t wc = chr; + waddnwstr(win, &wc, 1); } /** |
