From 2e65b9f5e409d5945fd50853617a5082fc7ea150 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 1 Jan 2025 20:39:15 +0100 Subject: [PATCH] StatusBar: call UpdateScrollLayout() in OnResize() Since `hscroll` depends on the window size, we need to update it every time the terminal window gets resized. --- NEWS | 1 + src/StatusBar.cxx | 2 ++ 2 files changed, 3 insertions(+) diff --git a/NEWS b/NEWS index b999b6c4..813fdfbe 100644 --- a/NEWS +++ b/NEWS @@ -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) diff --git a/src/StatusBar.cxx b/src/StatusBar.cxx index e23e50b2..e0c125d7 100644 --- a/src/StatusBar.cxx +++ b/src/StatusBar.cxx @@ -254,6 +254,8 @@ StatusBar::OnResize(Point p, unsigned width) noexcept { window.Resize({width, 1u}); window.Move(p); + + UpdateScrollLayout(); } void