notedeck

One damus client to rule them all
git clone git://jb55.com/notedeck
Log | Files | Refs | README | LICENSE

commit 9e4c9205699770855bbffac04e7331a62248e5d4
parent 8763621da5efd923efc20ab22191d07a13da7e11
Author: William Casarin <jb55@jb55.com>
Date:   Sat, 22 Nov 2025 02:18:07 -0800

columns: fix selected column index if we remove it

Signed-off-by: William Casarin <jb55@jb55.com>
Changelog-Fixed: Fix crash if we remove the selected column

Diffstat:
Mcrates/notedeck_columns/src/column.rs | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/crates/notedeck_columns/src/column.rs b/crates/notedeck_columns/src/column.rs @@ -242,6 +242,11 @@ impl Columns { self.columns.remove(index); + // if we've removed the selected column, reduce the index by 1 + if self.selected == (index as i32) && self.selected != 0 { + self.selected -= 1; + } + if self.columns.is_empty() { self.new_column_picker(); }