Hello, please consider my request for change.
I would imagine that most Sublime Text users are programmers. If this is true this request in my opinion should be considered. The following use case could never be a problem in Windows but it is always a problem in Linux. After the use case I will summarize the mouse wheel behavior under Windows and Linux.
To get started:
OS: Ubuntu 24.04.2 LTS
Sublime Text: Build 4192
My Use Case
I am editing a large script and I notice that I named a variable wrong due to a misspelling. To solve the problem I:
-
Double click the misspelled variable name.
-
Ctrl+f to find all occurrences.
-
Without deselecting what I previously double-clicked, I use the mouse wheel to scroll down looking at all of the highlighted occurrences.
-
As I am scrolling with the mouse wheel I unknowingly accidentally push down on the mouse wheel several times. Because the text I was searching for is still selected by virtue of the double-click. That selected text was pasted into my code every time I accidentally pushed down on the wheel while spinning it. I didn’t notice because any paste that was made had already scrolled off the screen.
-
I willingly save my changes and run the script and errors are reported. I find out that the text I was searching for got pasted 6 times seemingly in random places in my script. If I don’t remember the text I was searching for it is very difficult to fix the code.
Maybe most people tend to click on white space in the editor to deselect the text before they use the wheel to scroll, I’m not sure. Myself I have old habits from Windows where this was never an issue. The most frustrating part is when editing a bash script and this happens, more times than not the script does not report an error when you run it. The result is that suddenly the script doesn’t do the things it used to do before you edited it. I have spent more time troubleshooting the script than I have writing it. This most recent script is over 2400 lines that build an nginx server.
In Sublime Text Version: 4192 there is no global setting to override the default to noop. My server has 6 users so I have to go to their desk, make them login so i can manually paste the json setting into Preferences->Mouse Bindings. If I add a new user I have to Police this setting yet again.
Bottom Line, it would be so much easier to change the default to noop in the distribution.
Here are some things that you probably already know but I’m going to include it to give context.
Here’s a breakdown of how the middle mouse button (the wheel click) behaves by default on Windows and Ubuntu :
Windows (10/11):
- By default, Windows does not enable middle-click functionality via the mouse wheel for most applications (including text editors). Instead, the middle-click is typically used in specialized applications (like web browsers for tab management or 3D modeling software), but it’s not actively mapped to paste clipboard content in most cases.
- Clipboard Pasting : In Windows , the middle-click paste functionality isn’t automatically tied to the clipboard in most applications. It requires a more specific program or action to trigger, which may be why you’re not encountering this issue.
Ubuntu (Linux):
- In Ubuntu and many other Linux distributions, the middle mouse button (the wheel click) is often mapped to paste the current selection by default . This behavior is commonly linked to the X11 windowing system and how it handles mouse events. The middle-click will paste the current selection into text fields or documents, which can be a bit of a problem when you accidentally click the wheel while scrolling, as you’re experiencing.
Why the Difference?
- Clipboard Management : On Linux (Ubuntu) , the " Primary Selection " clipboard mechanism is different from Windows and macOS. In Linux, the middle-click (wheel click) by default pastes the “Primary Selection” clipboard (i.e., the last text selected) rather than the clipboard that you actively copy via Ctrl+C.
- Windows and macOS don’t use this behavior, so the middle-click functionality is generally reserved for other functions (like opening links in browsers or for use in specific software, not clipboard pasting).
Thank you for your time, I look forward to your reply.