Bug 485738 - Kate crashes when deleting the file that is the only one opened in split view
Summary: Kate crashes when deleting the file that is the only one opened in split view
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 24.02.2
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-18 14:23 UTC by Andrew Shark
Modified: 2024-04-18 15:04 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Shark 2024-04-18 14:23:04 UTC
STEPS TO REPRODUCE
1. Create two files in home directory: 1.txt and 2.txt
2. Open 1.txt in Kate, Open 2.txt in Kate.
3. Click View | Split View | Split Vertical
4. Close 2.txt in the left view.
So now you have the only tab in left view which is 1.txt, and the only tab in right view with 2.txt.
5. In the right view, right click on the 2.txt tab, and choose "Delete".
6. It asks "Do you really want to delete...?", answer Yes.

OBSERVED RESULT
Kate crashes

EXPECTED RESULT
Kate should not crash. As there are no more tabs opened in right split view, it should be either closed, or a placeholder should be shown there.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Graphics Platform: Wayland
Comment 1 Waqar Ahmed 2024-04-18 15:04:17 UTC
Git commit fa9cd5b098875ff8d0a844d2161eeb54064fa75b by Waqar Ahmed.
Committed on 18/04/2024 at 14:40.
Pushed by waqar into branch 'master'.

Fix crash on deleting the only file in view

M  +4    -1    apps/lib/kateviewspace.cpp

https://invent.kde.org/utilities/kate/-/commit/fa9cd5b098875ff8d0a844d2161eeb54064fa75b