about summary refs log tree commit diff
path: root/buffer.c
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 /buffer.c
parentAdd C-r, C-s for basic scrollback search (diff)
downloadtest-05f94f1b8b638a5f0b347d972bbbf1c3cad6f3e6.tar.gz
test-05f94f1b8b638a5f0b347d972bbbf1c3cad6f3e6.zip
Handle non-alignment tabs in line wrapping
Diffstat (limited to '')
-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;
fields to size_tJune McEnroe In the version of zlib in OpenBSD, these fields are of type off_t, which is signed (why?), rather than uLong. 2020-06-07Call static_assert by _Static_assertJune McEnroe OpenBSD doesn't #define static_assert in assert.h and _Static_assert is its real name I guess so why not? 2020-06-07Add OpenBSD to install.shJune McEnroe Straightforward. 2020-06-03Add The Song of AchillesJune McEnroe 2020-06-01Allow redirecting input in everJune McEnroe 2020-05-31Add %c conversion to c scriptJune McEnroe 2020-05-31Add c script to READMEJune McEnroe 2020-05-31Add c scriptJune McEnroe 2020-05-31Update mdoc source URLsJune McEnroe 2020-05-26Remove unfinished PSF fontsJune McEnroe