[gnome-builder] editor-tab: move cursor to beginning of matched word



commit bbd78f7a8ce2b0421295362fa94e8f3cc95083e2
Author: Christian Hergert <christian hergert me>
Date:   Mon Oct 6 14:39:53 2014 -0700

    editor-tab: move cursor to beginning of matched word
    
    Rather than selecting the whole word, let's just move the cursor to the
    beginning of the word. Fixes some unwarranted accidental deletions.

 src/editor/gb-editor-tab.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/editor/gb-editor-tab.c b/src/editor/gb-editor-tab.c
index 6db8b67..9acb634 100644
--- a/src/editor/gb-editor-tab.c
+++ b/src/editor/gb-editor-tab.c
@@ -700,7 +700,13 @@ select_and_animate (GbEditorTab       *tab,
 
   gtk_text_iter_assign (&copy, begin);
 
+#if 0
+  /* select the entire word */
   gtk_text_buffer_select_range (GTK_TEXT_BUFFER (priv->document), begin, end);
+#else
+  /* move the cursor to the first character of the word */
+  gtk_text_buffer_select_range (GTK_TEXT_BUFFER (priv->document), begin, begin);
+#endif
   gtk_text_view_scroll_to_iter (GTK_TEXT_VIEW (priv->source_view), &copy, 0.0,
                                 TRUE, 0.5, 0.5);
 


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