about summary refs log tree commit diff
path: root/ui.c
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-09-02 01:55:44 -0400
committerJune McEnroe <june@causal.agency>2020-09-02 01:57:51 -0400
commita84c9cdda7f6a4115d22983124bb70327ffbe785 (patch)
tree94b46d0ac8137c0e41f110aa712268531645d8a8 /ui.c
parentRender one main window from buffers (diff)
downloadcatgirl-a84c9cdda7f6a4115d22983124bb70327ffbe785.tar.gz
catgirl-a84c9cdda7f6a4115d22983124bb70327ffbe785.zip
Fix line wrapping in various ways
Never split a codepoint, don't set wrapping point unless we're not
already wrapping, wrap on any unicode whitespace, only clear rest of
line if still on the same line...
Diffstat (limited to 'ui.c')
-rw-r--r--ui.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ui.c b/ui.c
index 3ecea9f..89dd4da 100644
--- a/ui.c
+++ b/ui.c
@@ -457,7 +457,9 @@ static void windowUpdate(void) {
 		if (line->heat < Cold && window->ignore) continue;
 		wmove(main, y, 0);
 		styleAdd(main, line->str);
-		wclrtoeol(main);
+		int ny, nx;
+		getyx(main, ny, nx);
+		if (ny == y) wclrtoeol(main);
 		if (!y--) break;
 	}