<table><tr><td style="">tristanp created this revision.<br />Herald added a project: KDevelop.<br />Herald added a subscriber: kdevelop-devel.<br />tristanp requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D20548">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>When using multiple area indexes (splitted views) the document switcher<br />
activated with Ctrl+Tab was always changing the document of the first<br />
splitted view even if the second view was selected.</p>

<p>Looking at the plugin code, it uses a list of last enabled views (Sublime::View)<br />
and activate a view thanks to Sublime::Window::activateView, but this function<br />
only show a view in its container (Sublime:Container) which was used when adding<br />
the view.</p>

<p>It tends to confirm that switching a view will always keep it in the same<br />
area index.</p>

<p>To solve this issue, the behaviour of the document plugin (documentview) is<br />
mimicked by using Sublime::[Url]Document instead of Sublime::View and call<br />
openDocument from document controller. This function seems to automatically<br />
detect if creating a new view is needed or a old can be reused depending on<br />
the current area index.</p>

<p>Note: This is my first patch in this projet, please let me know if I miss anything.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>BRANCH</strong><div><div>switch_doc_1</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D20548">https://phabricator.kde.org/D20548</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>plugins/documentswitcher/documentswitcherplugin.cpp<br />
plugins/documentswitcher/documentswitcherplugin.h</div></div></div><br /><div><strong>To: </strong>tristanp<br /><strong>Cc: </strong>kdevelop-devel, glebaccon, domson, antismap, iodelay, alexeymin, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd<br /></div>