about summary refs log tree commit diff
path: root/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'buffer.c')
-rw-r--r--buffer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/buffer.c b/buffer.c
index 15d89f8..bdf9e3a 100644
--- a/buffer.c
+++ b/buffer.c
@@ -123,17 +123,18 @@ static int flow(struct Lines *hard, int cols, const struct Line *soft) {
 		int n = mbtowc(&wc, str, len);
 		if (n < 0) {
 			n = 1;
-			width++;
+			// ncurses will render these as "~A".
+			width += (*str & '\200' ? 2 : 1);
 		} else if (wc == ZWS || wc == ZWNJ) {
-			// XXX: ncurses likes to render these as spaces when they should be
+			// ncurses likes to render these as spaces when they should be
 			// 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.
+			// Assuming TABSIZE = 8.
 			width += 8 - (width % 8);
 		} else if (wc < L' ' || wc == L'\177') {
-			// XXX: ncurses will render these as "^A".
+			// ncurses will render these as "^A".
 			width += 2;
 		} else if (wcwidth(wc) > 0) {
 			width += wcwidth(wc);
2024-06-10Resize using target pixel counts for consistencyJune McEnroe This will resize film scans to about the same size as for the digital photos. 2024-06-10Add The Girl Who Was Convinced...June McEnroe Not much there. The illustrations are very nice though. 2024-06-09Add photos from May 31June McEnroe 2024-06-09Use monospace on photo pagesJune McEnroe 2024-06-09Put lens and (future) film at the tops of photo pagesJune McEnroe 2024-05-22Remove use of sysexits.hJune McEnroe 2024-05-22Add photo descriptions from 05-03 and 05-06June McEnroe 2024-05-21Fix = precedence in whenJune McEnroe