wezterm
wezterm copied to clipboard
Way too easy to close accidentaly a tab using middle mouse key
What Operating System(s) are you seeing this problem on?
Linux Wayland
Which Wayland compositor or X11 Window manager(s) are you using?
Gnome/Mutter
WezTerm version
20220802-215653-1df1f166
Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?
Yes, and I updated the version box above to show the version of the nightly that I tried
Describe the bug
I use a lot the middle mouse to paste text in the console, and if the cursor is accidentally in the tab bar, the tab is closed without any warning or confirmation. I tried the patch below but it didn't help;
diff --git a/wezterm-gui/src/termwindow/mouseevent.rs b/wezterm-gui/src/termwindow/mouseevent.rs
index 4d5f303c1..310f8a469 100644
--- a/wezterm-gui/src/termwindow/mouseevent.rs
+++ b/wezterm-gui/src/termwindow/mouseevent.rs
@@ -408,7 +408,7 @@ impl super::TermWindow {
},
WMEK::Press(MousePress::Middle) => match item {
TabBarItem::Tab { tab_idx, .. } => {
- self.close_tab_idx(tab_idx).ok();
+ self.close_specific_tab(tab_idx, true);
}
TabBarItem::NewTabButton { .. } | TabBarItem::None => {}
},
At the end, I removed the whole self.close_..
line
To Reproduce
Use a lot the middle mouse button..
Configuration
no config
Expected Behavior
No response
Logs
No response
Anything else?
The problem appeared after https://github.com/wez/wezterm/commit/d19db3c87b9412dbe25cb5e029c737de7a7f96ca
Fixed for me by https://github.com/wez/wezterm/commit/f2f2b83899e0ea9eafa054265133cae1679ebbfc