Skip to content

Commit

Permalink
Fix underscrolling problem
Browse files Browse the repository at this point in the history
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
ea39657.
  • Loading branch information
H3rnand3zzz committed Dec 4, 2023
1 parent 9ef05f4 commit d7e46d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/window.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d7e46d6

Please sign in to comment.