Using middle-click to close tabs does not work if there are more tabs than can be displayed on the screen.
Open a number of files in Zettlr (6+ in 1080p) to cause the tabs to begin to overflow
Middle click should always close tabs, the mousewheel can already be used to scroll the tabs, so I don't see a need for a middle-click action that's inconsistent.
Video of this bug in action: video.zip
Video of this bug in action: video.zip
Please do not upload ZIP files. Use any preferred hoster so that no downloads are required for this, please.
Furthermore: Does the console (Develop menu -> Toggle Developer tools -> Console tab) show some error or something? Might be related to #801 (pinging @Zverik )
Hi @nathanlesage
Apologies, here's the video hosted on streamable.
I can't see anything in the log (Zettlr logs or Console) when this middle-click behaviour occurs, but do see file close actions when the click registers (when there's enough space on the screen for the tabs to not overflow).
Aaaaaah, the video explains it! The middle click on Windows triggers a scroll action (which I'm afraid we can't really circumvent, as not all mouses have a horizontal-scroll-scroll wheel)
VSCode makes this work by providing Ctrl + PgUp and Ctrl + PgDn controls to navigate between tabs when a scrollwheel isn't available.
I'm afraid we can't really circumvent, as not all mouses have a horizontal-scroll-scroll wheel
You can scroll through the tabs in Zettlr using a 'regular' mousewheel (scroll up & scroll down). If you have a mousewheel, midde-click behaviour should close tabs (it's not preventing you from scolling through them by doing so), and if you don't have a mousewheel in 2020... I don't know!
Yeah, basically it would mean to disable the comfortable scrolling, but I'm in favor of that approach. Unfortunately, I can't test it, but I just committed something, so maybe it works now (but someone with a windows computer might want to test it)
Just checked on the develop branch. Not working on windows. :(
Huh. Seems to work in 1.8.0 alpha on windows. I don't know why it didn't when I tested.
EDIT: Thank you so much. I had no idea how often I was middle-clicking Zettlr tabs to try and close them until it started working!
Hehehehe, I like it if certain problems solve themselves :D
So, can we close this issue? 馃
Ugh, no. I was silly yesterday and didn't have quite enough tabs open to trigger this behaviour. It's not fixed and I got very excited over nothing. :'(