Bug 512893 - Implement "Close window when the last file is closed" option
Summary: Implement "Close window when the last file is closed" option
Status: REPORTED
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: 25.08.3
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-12-03 01:18 UTC by Boltronics
Modified: 2025-12-03 01:18 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Boltronics 2025-12-03 01:18:44 UTC
SUMMARY
There already exists an option called "Close the application entirely when the last file is closed", however this doesn't result in the desired behaviour when files are opened in another window. I would like a new option called something like "Close the current window when the last file is closed".

STEPS TO REPRODUCE
1. Check the option Behavior -> "Open each document in its own window"
2. Double click on two text files. You will now have two Kate windows, one open for each file.
3. Click on the X in the tab bar for the single open tab of one of the windows.

OBSERVED RESULT
The tab will close and be replaced by a new tab named "Untitled".

EXPECTED RESULT
The result is expected since another file is open in another window — assuming the user notices the other window. However, the desired result is actually to have the window closed, just as it does if only one file and one window are open.

As it stands, I believe the behaviour is inconsistent. When I click on X on the last open tab, I always expect to see the window close, but it will or won't depending on other Kate windows and files I have open — which may not show on the same virtual desktop, or even in the same KDE activity.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.5.3
KDE Frameworks Version: 6.20.0
Qt Version: 6.10.1
Kernel Version: 6.17.9-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × AMD Ryzen 9 7950X3D 16-Core Processor
Memory: 64 GiB of RAM (61.9 GiB usable)
Graphics Processor 1: AMD Radeon RX 7900 XTX
Graphics Processor 2: AMD Ryzen 9 7950X3D 16-Core Processor