about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-09-06 22:43:50 -0400
committerJune McEnroe <june@causal.agency>2020-09-06 22:43:50 -0400
commit05f94f1b8b638a5f0b347d972bbbf1c3cad6f3e6 (patch)
treef0ac2557f2f6aee39f902cae3f1394f37bd1e233
parentAdd C-r, C-s for basic scrollback search (diff)
downloadcatgirl-05f94f1b8b638a5f0b347d972bbbf1c3cad6f3e6.tar.gz
catgirl-05f94f1b8b638a5f0b347d972bbbf1c3cad6f3e6.zip
Handle non-alignment tabs in line wrapping
-rw-r--r--buffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/buffer.c b/buffer.c
index ff21eb4..7478211 100644
--- a/buffer.c
+++ b/buffer.c
@@ -128,6 +128,9 @@ static int flow(struct Lines *hard, int cols, const struct Line *soft) {
 			// zero-width, so just remove them entirely.
 			memmove(str, &str[n], strlen(&str[n]) + 1);
 			continue;
+		} else if (wc == L'\t') {
+			// XXX: Assuming TABSIZE = 8.
+			width += 8 - (width % 8);
 		} else if (wc < L' ') {
 			// XXX: ncurses will render these as "^A".
 			width += 2;
ert input to multibyte before handlingJune McEnroe 2018-08-07Populate tab-complete listJune McEnroe 2018-08-07Fix /me formatting side-effectsJune McEnroe 2018-08-07Define ui.c BUF_LEN with enumJune McEnroe 2018-08-07Hack clang into checking uiFmt format stringsJune McEnroe 2018-08-07Handle PART and QUIT without messagesJune McEnroe 2018-08-07Make safe filling the who bufferJune McEnroe 2018-08-07Add reverse and reset IRC formatting codesJune McEnroe 2018-08-06Rewrite line editing again, add formattingJune McEnroe 2018-08-06Fix allocation size in vaswprintfJune McEnroe 2018-08-06Implement word wrappingJune McEnroe 2018-08-06Use wchar_t strings for all of UIJune McEnroe 2018-08-06Rename line editing functionsJune McEnroe 2018-08-05Initialize all possible color pairsJune McEnroe 2018-08-05Refactor color initializationJune McEnroe 2018-08-05Add ^L redrawJune McEnroe 2018-08-05Use 16 colors if availableJune McEnroe 2018-08-05Limit parsed colors to number of mIRC colorsJune McEnroe 2018-08-04Show source link on exitJune McEnroe 2018-08-04Implement line editing, scrollingJune McEnroe 2018-08-04Handle /topicJune McEnroe