Skip to content

Fix overflow errors and allow small terminal sizes - #473

Merged
arybczak merged 1 commit into
masterfrom
unknown repository
Apr 25, 2021
Merged

arybczak merged 1 commit into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Apr 24, 2021

Copy link
Copy Markdown
  • In Wait for a sufficiently large screen and do not terminate #259 users request the ability to have ncmpcpp remain open when the
    terminal has a small size. Previously ncmpcpp would exit when there
    were less than 30 columns or 5 rows.
  • After removing this constraint, ncmpcpp would freeze when terminal
    sizes went below those thresholds.
  • Upon debugging, it became clear that ncmpcpp wasn't frozen, it was
    stuck in a very long for loop because it thought the display was
    unreasonably large (resulting from integer overflow).
  • Preventing that overflow allows ncmpcpp to handle small sizes
    gracefully. No other changes to the rendering code were necessary.

Fixes #259

* In #259 users request the ability to have ncmpcpp remain open when the
  terminal has a small size. Previously ncmpcpp would exit when there
  were less than 30 columns or 5 rows.
* After removing this constraint, ncmpcpp would freeze when terminal
  sizes went below those thresholds.
* Upon debugging, it became clear that ncmpcpp wasn't frozen, it was
  stuck in a very long for loop because it thought the display was
  unreasonably large (resulting from integer overflow).
* Preventing that overflow allows ncmpcpp to handle small sizes
  gracefully. No other changes to the rendering code were necessary.

Fixes #259
@arybczak
arybczak merged commit 71970fa into ncmpcpp:master Apr 25, 2021
@arybczak

Copy link
Copy Markdown
Collaborator

Thanks!

@ghost
ghost deleted the issue/259 branch April 25, 2021 18:00
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.

Wait for a sufficiently large screen and do not terminate

2 participants