about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2020-02-05 18:18:25 -0500
committerJune McEnroe <june@causal.agency>2020-02-05 18:18:41 -0500
commita7b0ed99079065f54db83160dfe651ce9d50a568 (patch)
tree04dfcbdbe50c96d5531950ff64bfe259d85a21ec
parentOnly reflow text when COLS changes (diff)
downloadcatgirl-a7b0ed99079065f54db83160dfe651ce9d50a568.tar.gz
catgirl-a7b0ed99079065f54db83160dfe651ce9d50a568.zip
Scroll the input window
I was wondering if I should instead make input wrap, but then wordWrap
would need to both support showing formatting and persisting styles
across to strings, and it would need to move the window pad up and down
a bunch, etc.
-rw-r--r--ui.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui.c b/ui.c
index da28b76..12c8541 100644
--- a/ui.c
+++ b/ui.c
@@ -220,10 +220,11 @@ void uiDraw(void) {
 		1, 0,
 		BOTTOM - 1, RIGHT
 	);
-	// TODO: Input scrolling.
+	int y, x;
+	getyx(input, y, x);
 	pnoutrefresh(
 		input,
-		0, 0,
+		0, (x > RIGHT ? x - RIGHT : 0),
 		BOTTOM, 0,
 		BOTTOM, RIGHT
 	);