I've been against this in the past - it is too easy to accidentally close a tab. Unlike other KDE apps, accidentally closing a Konsole tab would be really bad IMHO.
Also this conflicts w/ the huge tab split patch which changes a lot of code.
Is it really that easy to accidentally middle-click on a tab? On most mice, the mouse wheel is really small. I think the likeliest way to accidentally middle-click on a tab when trying to left-click on it is when using a buttonless touchpad with the Libinput driver and the default "Areas" click method, which creates a virtual, invisible middle-click button in the center of the touchpad's bottom edge. This is a really awful UX for other reasons though, not just here. :/
I think there's something to be said for consistency. Konsole already displays a warning when you try to close a tab with an active process, and that seems like probably enough safety. Konsole is an expert's tool, after all. There's not as much of a need to protect users from themselves when they're using experts-only tools.
Yes, it is. I lost the count I closed tabs when trying to paste text in yakuake/konsole, and the finger/mouse accidentally slipped on the tab just before the click.
Also, this has been requested as opt-out feature in yakuake, see D14860: Make middle click closes tab optional.
On most mice, the mouse wheel is really small.
There is no wheel when using a touchpad/trackpad...
There is already a confirmation dialog when you close a tab with a running process, so unless we cleverly account for that, this would result in two dialogs.
Makes sense, that was actually why I thought about it, but two dialogs is a bit too much indeed.
Every config options add a ton of extra code, though, but it's probably better to just refactor that in general.
I don't think we should present a dialog box because previously I have heard that dialog boxes are annoying to most users. @ngraham will know it.
Yeah, dialogs are bad if they happen too often, but config options aren't always good either (discoverability etc.).
What about hidding the tab, showing kmessagewidget "Tab xxx closed. undo" + timeout, and really closing the tab after the timeout? Works well on web/mobiles.
I can't stand it tbh., either the notification covers up stuff, or I don't manage to hit the undo button in time. Just hitting enter or escape to confirm or cancel is easier for something that's exceptional (i. e. doesn't usually happen).
If there was a confirmation dialog every time you closed a tab it would be different, but that's why we track the running process.