Skip to content
  • Waqar Ahmed's avatar
    Improve views closing in split view behaviour · 9880babc
    Waqar Ahmed authored and Christoph Cullmann's avatar Christoph Cullmann committed
    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
    9880babc