[gnome-builder/wip/libide] libide: add exclusive support to backward word end movements



commit a3f2bf9626c416dffd58c8b0c5336918811e9582
Author: Christian Hergert <christian hergert me>
Date:   Fri Mar 6 12:58:06 2015 -0800

    libide: add exclusive support to backward word end movements

 libide/ide-source-view-movements.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-source-view-movements.c b/libide/ide-source-view-movements.c
index e9440ad..ebc7c4f 100644
--- a/libide/ide-source-view-movements.c
+++ b/libide/ide-source-view-movements.c
@@ -772,6 +772,9 @@ ide_source_view_movements_previous_word_end (Movement *mv)
    */
   if (gtk_text_iter_compare (&mv->insert, &copy) > 0)
     gtk_text_buffer_get_start_iter (gtk_text_iter_get_buffer (&mv->insert), &mv->insert);
+
+  if (mv->exclusive && !gtk_text_iter_starts_line (&mv->insert))
+    gtk_text_iter_backward_char (&mv->insert);
 }
 
 static void
@@ -779,8 +782,12 @@ ide_source_view_movements_previous_full_word_end (Movement *mv)
 {
   if (!_ide_source_iter_starts_full_word (&mv->insert))
     _ide_source_iter_backward_full_word_start (&mv->insert);
+
   _ide_source_iter_backward_full_word_start (&mv->insert);
   _ide_source_iter_forward_full_word_end (&mv->insert);
+
+  if (mv->exclusive && !gtk_text_iter_starts_line (&mv->insert))
+    gtk_text_iter_backward_char (&mv->insert);
 }
 
 static void


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