[gnome-builder/gnome-builder-3-20] vim: fix * and # search movements



commit 3831a7981925ca682835e1e9a38bd8eaab76a6bf
Author: Fangwen Yu <yynyygy gmail com>
Date:   Mon May 2 10:52:58 2016 +0800

    vim: fix * and # search movements
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765889

 data/keybindings/vim.css |   12 ++++++------
 libide/ide-source-view.c |    3 +++
 2 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/data/keybindings/vim.css b/data/keybindings/vim.css
index 14d5de1..f2ab080 100644
--- a/data/keybindings/vim.css
+++ b/data/keybindings/vim.css
@@ -330,16 +330,16 @@
   bind "n" { "move-search" (tab-forward, 0, 0, 1, 1, 0) };
   bind "<shift>n" { "move-search" (tab-backward, 0, 0, 0, 1, 0) };
 
-  bind "numbersign" { "movement" (previous-word-end, 0, 1, 1)
-                      "movement" (next-word-start, 0, 1, 0)
-                      "movement" (next-word-end, 1, 0, 1)
+  bind "numbersign" { "movement" (next-word-end, 0, 1, 0)
+                      "movement" (previous-word-start, 0, 1, 0)
+                      "movement" (next-word-end, 1, 0, 0)
                       "set-search-text" ("", 1)
                       "movement" (previous-char, 0, 1, 0)
                       "move-search" (up, 0, 0, 0, 1, 1) };
 
-  bind "asterisk" { "movement" (previous-word-end, 0, 1, 1)
-                    "movement" (next-word-start, 0, 1, 0)
-                    "movement" (next-word-end, 1, 0, 1)
+  bind "asterisk" { "movement" (next-word-end, 0, 1, 0)
+                    "movement" (previous-word-start, 0, 1, 0)
+                    "movement" (next-word-end, 1, 0, 0)
                     "set-search-text" ("", 1)
                     "move-search" (down, 0, 0, 1, 1, 1) };
 
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 49e46bc..457a574 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -3663,6 +3663,9 @@ ide_source_view_real_move_search (IdeSourceView    *self,
   gtk_source_search_context_set_highlight (priv->search_context, TRUE);
 
   settings = gtk_source_search_context_get_settings (priv->search_context);
+
+  gtk_source_search_settings_set_at_word_boundaries (settings, word_boundaries);
+
   search_text = gtk_source_search_settings_get_search_text (settings);
 
   if (search_text == NULL || search_text[0] == '\0')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]