Skip to content

Set PAD_SIZE back to 1000#2074

Closed
mirror230469 wants to merge 1 commit intoprofanity-im:masterfrom
mirror230469:2045-fix-ncurses-overflow-bug
Closed

Set PAD_SIZE back to 1000#2074
mirror230469 wants to merge 1 commit intoprofanity-im:masterfrom
mirror230469:2045-fix-ncurses-overflow-bug

Conversation

@mirror230469
Copy link
Copy Markdown

PAD_SIZE was set to 100 in f27fa98
Set PAD_SIZE back to 1000 to fix the Ncurses Overflow! ... pos: 99, ... problem.

Fixes: #2045
Fixes: f27fa98

PAD_SIZE was set to 100 in f27fa98
Set PAD_SIZE back to 1000 to fix the `Ncurses Overflow! ... pos: 99, ...` problem.

Fixes: profanity-im#2045
Fixes: f27fa98
@jubalh jubalh requested a review from sjaeckel January 22, 2026 12:17
@jubalh
Copy link
Copy Markdown
Member

jubalh commented Mar 19, 2026

@sjaeckel what should we do here?

@jubalh
Copy link
Copy Markdown
Member

jubalh commented Mar 19, 2026

The problem with setting it back to 1000 it will require a lot of memory again. We maybe need dynamic resizing.

jubalh added a commit that referenced this pull request Mar 19, 2026
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
@jubalh jubalh closed this in #2122 Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

101th history line (Buffer?) always get deleted

2 participants