From d7e46d64fe6bc9926eb404dad6a4803e1fc2e8b2 Mon Sep 17 00:00:00 2001 From: John Hernandez <129467592+H3rnand3zzz@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:56:50 +0100 Subject: [PATCH] Fix underscrolling problem The problem is caused by ncurses library rendering only 1000 lines, while it's possible that we have long messages in the buffer. Current buffer limit is 200 messages, with just average size of message of 10 lines, ncurses buffer is being overflown and we render only part of the message. This causing a problem of "underscrolling": user is unable to scroll to the top or bottom and he is stuck somewhere in the middle of the history. It's not a permanent solution, but rather a temporary fix before introducing line-counting which will align Profanity's message buffer size in **lines** with ncurses' limits. It might be even adjustable setting in the future. The problem was caused by a faulty logic that 1 message = 1 line and it's a second try to address it, the try earlier was ea39657b0ad5d41f36deb609d85ef04ff3605e65. --- src/ui/window.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ui/window.h b/src/ui/window.h index 9bbbf8c4..44b81516 100644 --- a/src/ui/window.h +++ b/src/ui/window.h @@ -56,7 +56,7 @@ #include "xmpp/contact.h" #include "xmpp/muc.h" -#define PAD_SIZE 1000 +#define PAD_SIZE 10000 #define LOADING_MESSAGE "Loading older messages…" void win_move_to_end(ProfWin* window);