From 5e65ca6d0bb414e60ce40f6a8f9418cb18d6c86f Mon Sep 17 00:00:00 2001 From: Jason Rodney Hansen Date: Tue, 14 Jan 2025 18:42:57 -0700 Subject: [PATCH] Fix resetting shift select range Before this fix the following steps would not work correctly: 1. Select a range with shift click. 2. Select a single item that's in the currently selected range, without holding shift. 3. Hold shift and click another item to select a new range. Instead of the item selected in step 2 being the start or end of the range, the original range from step one is used to get the start or end of the new range. This fix makes sure the range gets reset when selecting an item in step 2. --- src/tab.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tab.rs b/src/tab.rs index abfb46f..550b153 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -2245,8 +2245,8 @@ impl Tab { if !item.selected { self.clicked = click_i_opt; item.selected = true; - self.select_range = Some((i, i)); } + self.select_range = Some((i, i)); self.select_focus = click_i_opt; self.selected_clicked = true; } else if !dont_unset && item.selected {