summaryrefslogtreecommitdiff
path: root/ui.c
diff options
context:
space:
mode:
authorC. McEnroe2020-09-02 01:55:44 -0400
committerC. McEnroe2020-09-02 01:57:51 -0400
commita84c9cdda7f6a4115d22983124bb70327ffbe785 (patch)
tree94b46d0ac8137c0e41f110aa712268531645d8a8 /ui.c
parent149cafc5abe7f8a7709d8d100a5e6c547eab0b52 (diff)
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;
}