1
0
Fork 0
forked from murx/irc9

Scroll compose input to keep the cursor visible

This commit is contained in:
Johannes Findeisen 2026-11-29 03:28:42 +01:00
commit 94e16d4b32

2
irc9.c
View file

@ -2597,7 +2597,7 @@ static void draw_input(void)
x += width; x += width;
i += len ? (int)len : 1; i += len ? (int)len : 1;
} }
while (saving && x >= cols && start < pos) { while (x >= cols && start < pos) {
int width; int width;
size_t len = terminal_character(text + start, (size_t)(pos - start), &width); size_t len = terminal_character(text + start, (size_t)(pos - start), &width);
start += len ? (int)len : 1; start += len ? (int)len : 1;