[gtksourceview/wip/custom-word-boundaries-2: 4/4] view: override word boundaries for GtkTextView::move-cursor



commit 53e5f0ef14df0efdfcc5164161cd81d165ba8920
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Sun Dec 21 15:20:37 2014 +0100

    view: override word boundaries for GtkTextView::move-cursor

 gtksourceview/gtksourceview.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index 58d931a..66d1743 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -1634,6 +1634,13 @@ move_cursor_smart_home_end (GtkTextView     *text_view,
 }
 
 static void
+move_cursor_words (GtkTextView *text_view,
+                  gint         count,
+                  gboolean     extend_selection)
+{
+}
+
+static void
 gtk_source_view_move_cursor (GtkTextView    *text_view,
                             GtkMovementStep step,
                             gint            count,
@@ -1649,6 +1656,10 @@ gtk_source_view_move_cursor (GtkTextView    *text_view,
                        }
                        break;
 
+               case GTK_MOVEMENT_WORDS:
+                       move_cursor_words (text_view, count, extend_selection);
+                       return;
+
                default:
                        break;
        }


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