diff options
| -rw-r--r-- | doc/sciteco.1.in | 3 | ||||
| -rw-r--r-- | doc/sciteco.7.template | 6 | ||||
| -rw-r--r-- | src/interface-curses/curses-utils.c | 14 | ||||
| -rw-r--r-- | src/interface-curses/interface.c | 12 |
4 files changed, 17 insertions, 18 deletions
diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in index 83dba44..9b4b112 100644 --- a/doc/sciteco.1.in +++ b/doc/sciteco.1.in @@ -392,8 +392,11 @@ Integrating with Wayland and the Mac OS clipboards is of course also possible. . .LP .SCITECO_TOPIC "$GTK_CSD" +\# NOTE: Contrary to the GTK documentation, this is _not_ supported +\# natively yet. We have to implement it ourselves. On GTK+, you may turn off the infamous client-side window decorations by setting the environment variable \fBGTK_CSD\fP to \(lq0\(rq. +Alternatively, you can use the \(lq\-\-no\-csd\(rq command line parameter. . .LP .SCITECO_TOPIC "$SCITECO_SCINTILLUA_LEXERS" diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index e2fbdbf..a3139bf 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -1190,9 +1190,9 @@ You can also specify \fB--8bit\fP to optimize \*(ST for While navigation in documents with single-byte encodings takes place in constant time, \*(ST uses heuristics in UTF-8 documents for translating between byte and character -offsets which are slower especially when \(lqjumping\(rq -into very large lines. -\# But there are optimizations for R, C and A... +offsets which can still be slow when e.g. when \(lqjumping\(rq +into far away pathologically long lines. +Operations close to dot should be fast, though. .LP .SCITECO_TOPIC "EOL translation" To simplify working with files using different end of line diff --git a/src/interface-curses/curses-utils.c b/src/interface-curses/curses-utils.c index 3b25d56..cb57475 100644 --- a/src/interface-curses/curses-utils.c +++ b/src/interface-curses/curses-utils.c @@ -117,12 +117,7 @@ teco_curses_format_str(WINDOW *win, const gchar *str, gsize len, gint max_width) chars_added++; if (chars_added > max_width) goto truncate; - /* - * FIXME: This works with UTF-8 on ncurses, - * since it detects multi-byte characters. - * However on other platforms wadd_wch() may be - * necessary, which requires a widechar Curses variant. - */ + /* works for UTF-8 as well */ waddnstr(win, str, clen); } } @@ -183,12 +178,7 @@ teco_curses_format_filename(WINDOW *win, const gchar *filename, gint max_width) max_width = getmaxx(win) - old_x; if (filename_len <= max_width) { - /* - * FIXME: This works with UTF-8 on ncurses, - * since it detects multi-byte characters. - * However on other platforms wadd_wch() may be - * necessary, which requires a widechar Curses variant. - */ + /* works for UTF-8 as well */ waddstr(win, filename_printable); } else if (filename_len >= truncate_len) { const gchar *keep_post; diff --git a/src/interface-curses/interface.c b/src/interface-curses/interface.c index ff6a0f2..f99f413 100644 --- a/src/interface-curses/interface.c +++ b/src/interface-curses/interface.c @@ -977,7 +977,12 @@ teco_interface_getch(gboolean widechar) if (!widechar || !cp) break; - /* doesn't work as expected when passed a null byte */ + /* + * NOTE: There's also wget_wch(), but teco_interface_blocking_getch() + * should work for single bytes as well. + * + * Doesn't work as expected when passed a null byte + */ buf[i] = cp; cp = g_utf8_get_char_validated(buf, ++i); if (i >= sizeof(buf) || cp != -2) @@ -2217,8 +2222,9 @@ teco_interface_event_loop_iter(void) return; /* - * NOTE: There's also wget_wch(), but it requires - * a widechar version of Curses. + * NOTE: There's also wget_wch(), but teco_interface_blocking_getch() + * should work for single bytes as well. + * Also, we need the key as a string anyway. */ keybuf[keybuf_i++] = key; gsize len = keybuf_i; |
