GNOME Bugzilla – Bug 776356
:sp doesn't work for the first time after :q
Last modified: 2016-12-27 14:55:21 UTC
Steps for reproduction 1. open a file 2. run :sp 2. run :q 3. run :sp it doesn't work for the first time
Created attachment 342490 [details] [review] editor: make >>split command work all the time This is happening because all editor views share same view-stack.split-down action state. This patch makes view-stack.split-down action not having any state and whenever it is activated it toggles split state of active view by getting and setting reverse state.
Review of attachment 342490 [details] [review]: the terminal plugin use set_split_view too, so you need to implement get_split_view for it ::: libide/editor/ide-editor-view.c @@ +468,3 @@ + IdeEditorView *self = (IdeEditorView *)view; + + return !(self->frame2 == NULL); use return (self->frame2 != NULL); ::: libide/workbench/ide-layout-view.c @@ +84,3 @@ +ide_layout_view_get_split_view (IdeLayoutView *self) +{ + g_return_if_fail (IDE_IS_LAYOUT_VIEW (self)); return a boolean so use : g_return_val_if_fail (IDE_IS_LAYOUT_VIEW (self), FALSE); when building, you should have seen a warning about that in the terminal
there's alsoo the fact that the libidemm part is not updated,
Christian, what is the politic about maintaining libidemm up-to-date ?
Created attachment 342500 [details] [review] editor: make >>split command work all the time get_split_view is implemented for terminal view also and made other fixes. How libidemm affect this?
the libide methods are described in libidemm, for example for set_split_view here: https://git.gnome.org/browse/gnome-builder/tree/libidemm/src/libide_methods.defs#n3116 so the patch work but libidemm is not up-to-date anymore. Two solutions: We keep it up-to-date on a patch per patch basis (more work) or it's fixed later.
Attachment 342500 [details] pushed as f2a8419 - editor: make >>split command work all the time