Skip to content

Commit

Permalink
StatusBar: call UpdateScrollLayout() in OnResize()
Browse files Browse the repository at this point in the history
Since `hscroll` depends on the window size, we need to update it
every time the terminal window gets resized.
  • Loading branch information
MaxKellermann committed Jan 1, 2025
1 parent ca14e7f commit 2e65b9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ncmpc 0.52 - not yet released
* fix searching on Help and Song page
* fix scroll bug after resizing window
* build: require Meson 1.0

ncmpc 0.51 - (2024-09-23)
Expand Down
2 changes: 2 additions & 0 deletions src/StatusBar.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,8 @@ StatusBar::OnResize(Point p, unsigned width) noexcept
{
window.Resize({width, 1u});
window.Move(p);

UpdateScrollLayout();
}

void
Expand Down

0 comments on commit 2e65b9f

Please sign in to comment.