Reproducible: Always Steps to Reproduce: 1. Open Kate 2. Open file A 3. Split view (File A in both splits) 4. Open file B in 2nd split 5. Close file A in 2nd Split Actual Results: File B in both splits Expected Results: File A in 1st split File B in 2nd split
I can confirm this behaviour
I'll have a look soon, probably this should be changed.
This bug is still present in version 18.04. Since it's been almost 3 years, is it expected to be fixed any time in the future?
The question is: What is the intended behavior? At the moment, if you close a tab, this means, you close the document. Even if you have it open in X splits or mainwindows, it will be closed. This leads to the observed behavior. And I think that is the way it should be. Otherwise, you can't just really close a document easily anymore, as it will stay open, as long as it was ever open in some other tab or mainwindow, which IMHO is even more confusing.
This topic seems to be very old, but in fact i would love to use Kate for bigger projects as a dev, so far i am limited to small project for exactly this bug. In my opinion the intended behaviour is as follows: When you split a view vertically or horizontally, 2 seperate views are visible with equal size. Ideally the top/left view shows the original tabs and the new view is empty (so do not duplicate the document). I can then more tabs between different views. On closing a file, it only closes its current representation, not any duplicate. The reason behind this is that those split views are good to see several files at once. I usually have around 10+ open files at once. The way Kate treats this now leads to 1) each split having ALL files in them, hard to navigate between them 2) forcing a really complex order of opens and close to have an instance of each file appearing in ONE view only. Maybe there is some other use of those splits that i do notbenefit from, but i do not see how Christoph Cullmann's intended behaviour helps simplifying navigation. Would be really nice to get this back to the bug list, as i really believe in the power of Kate, even in comparison to all those super IDEs nowadays.
A lot of people seem to be having trouble figuring this out so I think our behaviour is probably not very intuitive. It is certainly different from what everyone else is doing. Hence I am reopening this.
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/560
Git commit 9880babc69472a97dd6d095dd39205099d6d4995 by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 17/01/2022 at 19:28. Pushed by cullmann into branch 'master'. Improve views closing in split view behaviour Currently if you have a doc that has 2 views in 2 different splits: A | A and you close one of them, it closes the other as well. This behaviour is really non-intuitive and is very unexpected to say the least. To start with, no one asked kate to close the other view so it shouldn't auto close it. Moreover suppose you have a viewspace with: AB and you want to open a new split, the new split will open to the *left* of the current one resulting in: A | AB, instead of AB | A. This is the opposite of what any app does. With this change, I am proposing a different solution: - If a doc has multiple views, only close the one that the user asked for in the current viewspace. - If the viewspace becomes empty, there is no need to refill it, close the viewspace. If this is the last viewspace, it remains open. - Lastly, when doing vertical split, open the new viewspace *after* the current one not before. This behaviour is consistent with other editors and apps doing splits. M +14 -4 kate/kateviewmanager.cpp M +3 -1 kate/kateviewmanager.h M +29 -1 kate/kateviewspace.cpp M +7 -0 kate/kateviewspace.h https://invent.kde.org/utilities/kate/commit/9880babc69472a97dd6d095dd39205099d6d4995