[gnome-builder] editor-view: focus previous split if available upon vim cycle-previous
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] editor-view: focus previous split if available upon vim cycle-previous
- Date: Wed, 21 Jan 2015 01:06:21 +0000 (UTC)
commit ce0b6a975c136ddd9bc6af90d9642d14091dca12
Author: Christian Hergert <christian hergert me>
Date: Tue Jan 20 17:05:23 2015 -0800
editor-view: focus previous split if available upon vim cycle-previous
https://bugzilla.gnome.org/show_bug.cgi?id=742855
src/editor/gb-editor-view.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
---
diff --git a/src/editor/gb-editor-view.c b/src/editor/gb-editor-view.c
index 16fb5a7..edc9376 100644
--- a/src/editor/gb-editor-view.c
+++ b/src/editor/gb-editor-view.c
@@ -703,9 +703,18 @@ gb_editor_view_on_vim_split (GbEditorView *self,
break;
case GB_SOURCE_VIM_SPLIT_CYCLE_PREVIOUS:
- /* TODO: Take our split into account */
- gb_widget_activate_action (GTK_WIDGET (self), "stack", "focus-left",
- NULL);
+ {
+ GbEditorFrame *frame2;
+
+ frame2 = gb_editor_view_get_frame2 (self);
+
+ if (frame2 &&
+ gtk_widget_has_focus (GTK_WIDGET (frame2->priv->source_view)))
+ gb_editor_view_switch_pane (NULL, NULL, self);
+ else
+ gb_widget_activate_action (GTK_WIDGET (self), "stack", "focus-left",
+ NULL);
+ }
break;
case GB_SOURCE_VIM_SPLIT_CLOSE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]