D20548: Fix document switcher plugin with multiple splitted view.

Tristan Porteries noreply at phabricator.kde.org
Sun Apr 14 17:31:28 BST 2019


tristanp created this revision.
Herald added a project: KDevelop.
Herald added a subscriber: kdevelop-devel.
tristanp requested review of this revision.

REVISION SUMMARY
  When using multiple area indexes (splitted views) the document switcher
  activated with Ctrl+Tab was always changing the document of the first
  splitted view even if the second view was selected.
  
  Looking at the plugin code, it uses a list of last enabled views (Sublime::View)
  and activate a view thanks to Sublime::Window::activateView, but this function
  only show a view in its container (Sublime:Container) which was used when adding
  the view.
  
  It tends to confirm that switching a view will always keep it in the same
  area index.
  
  To solve this issue, the behaviour of the document plugin (documentview) is
  mimicked by using Sublime::[Url]Document instead of Sublime::View and call
  openDocument from document controller. This function seems to automatically
  detect if creating a new view is needed or a old can be reused depending on
  the current area index.
  
  Note: This is my first patch in this projet, please let me know if I miss anything.

REPOSITORY
  R32 KDevelop

BRANCH
  switch_doc_1

REVISION DETAIL
  https://phabricator.kde.org/D20548

AFFECTED FILES
  plugins/documentswitcher/documentswitcherplugin.cpp
  plugins/documentswitcher/documentswitcherplugin.h

To: tristanp
Cc: kdevelop-devel, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20190414/95a1bbb2/attachment.html>


More information about the KDevelop-devel mailing list