[Github-comments] [geany] Splitwindow refactoring (#724)

Colomban Wendling notifications at xxxxx
Sun Nov 1 17:26:02 UTC 2015


An (old, as in started in 2012) attempt to make the splitwindow plugin more usable.  See http://lists.geany.org/pipermail/devel/2013-October/008217.html and around for some details.

This is of course still some kind of hack as it's still a plugin.  See #185 for an alternative.

Closes #264, #604, #631, #721.

I PR this because splitwindow seems to get some attention, so it might avoid wasting some people's time reproducing some existing work.  Also, it should be pretty usable, and basically requires testing.

Known issues:
* If the system (or GTK) is too slow to switch panes, and the user clicks on the split side with the mouse (which will trigger a pane swap), it'll likely start a selection extension (e.g. as if the button release never fired).  For example, I see this on my system when I have like 250 files/tabs open.
  This could be avoided easily by not forwarding the PRESS event but only the RELEASE one, but it then means it's not possible to start a selection extension on the split side, even willingly.
* As the panes get split when clicking on it, some mouse operations don't directly work on the split side, i.e. DnD can't be started on the split side directly, or pasting PRIMARY with the mouse on the split side if the source is on either side.
* This PR doesn't fix custom markers not being copied from the non-split view (e.g. customized markers will be displayed with the default styles on the split side, as these are view-specific settings).

But before getting too terrified by these issues, remember that the sides are swapped on any interaction, so the active one is always Geany's (the whole point of these changes).  This means that interaction on the split side should basically never happen, but right when swapping panes upon a button press (e.g. when clicking on the split side, while the click will trigger a pane swap the click is first received on the split side, obviously).
You can view, comment on, or merge this pull request online at:

  https://github.com/geany/geany/pull/724

-- Commit Summary --

  * splitwindow: Rework the design to swap editor and view on focus
  * splitwindow: Add a keybinding to switch focus from one pane to the other
  * splitwindow: Fix horizontal scrolling saving
  * splitwindow: Fix scrolling swapping with folded lines
  * splitwindow: Swap folding too
  * splitwindow: Close the document rather than unsplit when closing the tab
  * splitwindow: Follow editor tab placement in split notebook
  * splitwindow: Add a popup menu to the split notebook
  * splitwindow: Remove now useless stock Scintilla popup on the split view
  * Merge branch 'master' into splitwindow-refactoring
  * splitwindow: Simplify switching code
  * Merge branch 'master' into splitwindow-refactoring-m
  * Merge branch 'master' into splitwindow-refactoring-m
  * splitwindow: Add GTK3 toolbar style snippet
  * splitwindow: Don't use Geany internal API
  * Merge branch 'master' into splitwindow-refactoring-m
  * splitwindow: Fix forwarding the event that triggered a swap on GTK3
  * splitwindow: Restore selection upon swapping
  * splitwindow: Add some defensive internal state check
  * Merge branch 'master' into splitwindow-refactoring-m
  * splitwindow: Color the split label according to the modification status
  * splitwindow: Remove an outdated FIXME now we depend on GTK >= 2.24

-- File Changes --

    M plugins/splitwindow.c (532)

-- Patch Links --

https://github.com/geany/geany/pull/724.patch
https://github.com/geany/geany/pull/724.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/724
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151101/6da26a99/attachment.html>


More information about the Github-comments mailing list