Bug 463224

Summary: Unable to close file from split view
Product: [Applications] kate Reporter: Nico Dorn <nicodorn>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED NOT A BUG    
Severity: normal CC: waqar.17a
Priority: NOR    
Version First Reported In: 22.12.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Nico Dorn 2022-12-19 07:36:50 UTC
SUMMARY
In some cases one is unable to close a currently open file if split view is enabled.

STEPS TO REPRODUCE
1. Enable documents sidebar (View > Tools View > Show Documents).
2. Open file A.
3. View > Split View > Split Vertical
4. Open file B *directly into the right* split view area.
5. Switch to the left split view area (with file A).
6. Go to file B in the left split view area.
7. File > Close

OBSERVED RESULT
Kate gos to file A in the left split view area, but file B remains open (as one can see in the documents sidebar).

EXPECTED RESULT
File B should be closed directly.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.26
KDE Plasma Version: 5.26.4
KDE Frameworks Version: 5.101.0
Qt Version: 5.15.7
Kernel Version: 5.15.0-56-generic (64-bit)
Graphics Platform: X11
Graphics Processor: Mesa IntelĀ® UHD Graphics
System Version: Not Applicable

ADDITIONAL INFORMATION
This applies also to the shortcut Ctrtl + W, and the toolbar icon. The only way to close file B is via a right click in the documents view or every other way after closing every split view.
Comment 1 Waqar Ahmed 2022-12-30 14:15:11 UTC
This is working as intended. A document can have multiple "views", closing one view doesn't close the document.

> The only way to close file B is via a right click in the documents view

You can enable the close button in "Documents" plugin setting. search for "Show close button". Once enabled, it will show a "x" when you hover over a document in the sidebar.
Comment 2 Nico Dorn 2022-12-31 10:27:01 UTC
Thanks for looking into it, and thanks for the clarification!

It is dysfunctional nevertheless, as in this case File > Close does not do what it says. So from my point of view, it's still a usability bug. BTW, the behavior used to be different some time ago. "Close" actually closed a file in any circumstances.

At least, the close button in Documents is a bit of a relief. Thanks for the tip! But it still bothers me to use the mouse for every day stuff like this.
Comment 3 Waqar Ahmed 2022-12-31 10:32:00 UTC
> BTW, the behavior used to be different some time ago

True. We changed this a couple of releases ago after many many complaints about the behavior. It was also different from other editors / programs that have splits. So now it does what it says on the box: close tab closes the tab, just where the user asked it to be closed and not everywhere else, which was unexpected for many users.