[gnome-builder] vim: sync search text and direction from outside searches
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: sync search text and direction from outside searches
- Date: Thu, 29 Jan 2015 10:07:42 +0000 (UTC)
commit ce4a14b4f7488924dcdc40b0f7eda059ecd7fa13
Author: Ray Strode <rstrode redhat com>
Date: Tue Jan 27 21:49:38 2015 -0500
vim: sync search text and direction from outside searches
This commit saves the text and direction for searches initiated from
the view/frame on the vim object. This change will be necessary for
implementing the 'n' command, since the 'n' command needs to replay
the last search (be it from '*', '/' or the menu).
https://bugzilla.gnome.org/show_bug.cgi?id=743668
src/editor/gb-editor-view.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-view.c b/src/editor/gb-editor-view.c
index 1f87252..971dc27 100644
--- a/src/editor/gb-editor-view.c
+++ b/src/editor/gb-editor-view.c
@@ -827,6 +827,15 @@ gb_editor_view_toggle_split (GbEditorView *view)
G_CALLBACK (gb_editor_view_on_vim_split),
view,
G_CONNECT_SWAPPED);
+
+ g_object_bind_property (GB_EDITOR_FRAME (child2),
+ "search-direction",
+ vim, "search-direction",
+ G_BINDING_SYNC_CREATE);
+ g_object_bind_property (GB_EDITOR_FRAME (child2)->priv->search_settings,
+ "search-text",
+ vim, "search-text",
+ G_BINDING_SYNC_CREATE);
g_object_bind_property (view, "auto-indent",
GB_EDITOR_FRAME (child2)->priv->source_view,
"auto-indent",
@@ -1225,4 +1234,13 @@ gb_editor_view_init (GbEditorView *self)
"insert-spaces-instead-of-tabs",
self, "use-spaces",
G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
+
+ g_object_bind_property (self->priv->frame,
+ "search-direction",
+ vim, "search-direction",
+ G_BINDING_SYNC_CREATE);
+ g_object_bind_property (self->priv->frame->priv->search_settings,
+ "search-text",
+ vim, "search-text",
+ G_BINDING_SYNC_CREATE);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]