Conversation
The ncurses pad used for rendering window history had a fixed height of 100 lines, which caused "Ncurses Overflow!" errors and broke scrolling once the content exceeded this limit. This commit replaces the fixed limit with a dynamic resizing strategy. We use a minimum height of 100 lines. If a pad reaches its threshold of 3000 lines, a full redraw is triggered to reclaim space from discarded messages and reset the pad height. Pads are shrunk back to the minimum height during every redraw to minimize memory usage for inactive windows. Message history should always be smoothly scrollable now. d7e46d6 set it from 1000 to 10000. f27fa98 set it from 1000 to 100. Probably also relevant is 4fe2c42. Close: #2074 Fixes: #2045
Member
Author
|
Reminder: test in MUC |
Member
Author
|
I tried it in a MUC and it seems to work fine as well. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ncurses pad used for rendering window history had a fixed height of 100 lines, which caused "Ncurses Overflow!" errors and broke scrolling once the content exceeded this limit.
This commit replaces the fixed limit with a dynamic resizing strategy. We use a minimum height of 100 lines.
If a pad reaches its threshold of 3000 lines, a full redraw is triggered to reclaim space from discarded messages and reset the pad height. Pads are shrunk back to the minimum height during every redraw to minimize memory usage for inactive windows.
Message history should always be smoothly scrollable now.
d7e46d6 set it from 1000 to 10000. f27fa98 set it from 1000 to 100. Probably also relevant is 4fe2c42.
Close: #2074
Fixes: #2045
I tested this by sending a lot of messages in a 1:1 chat. With this change I could scroll up fine. And
Ncurses Overflowwasn't in the logs anymore.