From fde535faf1e89cafa2e17dc80a49150b84f27847 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 19 Nov 2022 08:25:54 -0700 Subject: [PATCH] Fix dragging by left or right status with retro tab bar Another good example of why `_ =>` in a match is probably a bad idea. refs: https://github.com/wez/wezterm/issues/2758 --- docs/changelog.md | 2 ++ wezterm-gui/src/termwindow/mouseevent.rs | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index f5c6aae4a..a5a7279b8 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -116,6 +116,8 @@ As features stabilize some brief notes about them will accumulate here. `SUPER+SHIFT+Page(Up|Down)` instead of the documented `CTRL+SHIFT+Page(Up|Down)` [#2705](https://github.com/wez/wezterm/issues/2705) +* Dragging by retro tab bar left or right status area would jump around erratically. + [#2758](https://github.com/wez/wezterm/issues/2758) #### Changed diff --git a/wezterm-gui/src/termwindow/mouseevent.rs b/wezterm-gui/src/termwindow/mouseevent.rs index 66827fbf7..ccdbbfda1 100644 --- a/wezterm-gui/src/termwindow/mouseevent.rs +++ b/wezterm-gui/src/termwindow/mouseevent.rs @@ -435,10 +435,10 @@ impl super::TermWindow { TabBarItem::None | TabBarItem::LeftStatus | TabBarItem::RightStatus => {} }, WMEK::Move => match item { - TabBarItem::None => { + TabBarItem::None | TabBarItem::LeftStatus | TabBarItem::RightStatus => { context.set_window_drag_position(event.screen_coords); } - _ => {} + TabBarItem::Tab { .. } | TabBarItem::NewTabButton { .. } => {} }, WMEK::VertWheel(n) => { self.activate_tab_relative(if n < 1 { 1 } else { -1 }, true)