Skip to content
Commit 9880babc authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

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.

BUG: 344374
parent 8c125d2a
Pipeline #124937 passed with stage
in 4 minutes and 23 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment