Bug 460613 - Closing tab on one side of the split view closes the other after restoring session
Summary: Closing tab on one side of the split view closes the other after restoring se...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: sessions (show other bugs)
Version: 22.08.1
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-17 17:58 UTC by Matthew Trescott
Modified: 2022-10-22 17:44 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Trescott 2022-10-17 17:58:01 UTC
SUMMARY
Normally, if I open a file twice (once on the left side of the split view and once on the right), I can close either tab independently of the other one.

However, if I save the session without closing either tab, and then restart Kate, the two tabs are now "linked" and closing one tab will close the other one too.

STEPS TO REPRODUCE
1. Start a new session
2. View -> Split View -> Split vertically
3. Open a file (the file appears in both halves of the split view)
4. Choose a different file and open it twice, once for each side of the split view
5. Save the session
6. Close Kate.
7. Reopen Kate and choose the saved session.
8. Close one of the tabs

OBSERVED RESULT
The tab with the same file on the other side of the split view closes by itself.

EXPECTED RESULT
The other tab with the same file on the other side of the split view remains open.

SOFTWARE/OS VERSIONS
Windows: Windows 10 21H2
Qt Version: 5.15.5 (as bundled with installer from binary-factory.kde.org)
Comment 1 Christoph Cullmann 2022-10-21 17:43:00 UTC
True, our logic is there just not correct.

https://invent.kde.org/utilities/kate/-/issues/88
Comment 2 Bug Janitor Service 2022-10-22 15:37:16 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/968
Comment 3 Christoph Cullmann 2022-10-22 17:09:16 UTC
Git commit 7014499f4b2c93bc61eac08e94d617b99baa50a4 by Christoph Cullmann, on behalf of Waqar Ahmed.
Committed on 22/10/2022 at 16:14.
Pushed by cullmann into branch 'master'.

Fix doc closing when active doc is in multiple viewspaces

M  +41   -0    apps/lib/autotests/kate_view_mgmt_tests.cpp
M  +1    -0    apps/lib/autotests/kate_view_mgmt_tests.h
M  +25   -0    apps/lib/kateviewmanager.cpp
M  +5    -0    apps/lib/kateviewmanager.h
M  +2    -2    apps/lib/kateviewspace.cpp

https://invent.kde.org/utilities/kate/commit/7014499f4b2c93bc61eac08e94d617b99baa50a4
Comment 4 Matthew Trescott 2022-10-22 17:44:02 UTC
Thank you! :)