[gnome-builder] source-view-movement: rename find_chars



commit 72878a264ec1699bba2370560e9914cf568641a8
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Mon Nov 9 19:19:37 2015 +0100

    source-view-movement: rename find_chars
    
    Like others functions called by _ide_vim_iter_*_find_char or
    gtk_text_iter_*_find_char, we 'suffix' it with _predicate

 libide/ide-source-view-movements.c |   23 ++++++++++++-----------
 1 files changed, 12 insertions(+), 11 deletions(-)
---
diff --git a/libide/ide-source-view-movements.c b/libide/ide-source-view-movements.c
index 41d0754..7a94cdd 100644
--- a/libide/ide-source-view-movements.c
+++ b/libide/ide-source-view-movements.c
@@ -1088,6 +1088,16 @@ find_chars_forward (GtkTextIter *cursor,
 
   return FALSE;
 }
+
+static gboolean
+find_char_predicate (gunichar ch,
+                     gpointer data)
+{
+  gunichar ch_searched = GPOINTER_TO_UINT (data);
+
+  return (ch == ch_searched);
+}
+
 static gboolean
 vim_percent_predicate (GtkTextIter *iter,
                        gunichar     ch,
@@ -1655,15 +1665,6 @@ ide_source_view_movements_previous_match_modifier (Movement *mv)
     }
 }
 
-static gboolean
-find_char (gunichar ch,
-           gpointer data)
-{
-  gunichar ch_searched = GPOINTER_TO_UINT (data);
-
-  return (ch == ch_searched);
-}
-
 static void
 ide_source_view_movement_match_search_char (Movement *mv, gboolean is_next_direction)
 {
@@ -1700,7 +1701,7 @@ ide_source_view_movement_match_search_char (Movement *mv, gboolean is_next_direc
       if (is_inclusive_mode && is_selection_positive)
         gtk_text_iter_backward_char (&insert);
 
-      if (gtk_text_iter_forward_find_char (&insert, find_char, GUINT_TO_POINTER (mv->modifier), &limit))
+      if (gtk_text_iter_forward_find_char (&insert, find_char_predicate, GUINT_TO_POINTER (mv->modifier), 
&limit))
         {
           if (is_till)
             gtk_text_iter_backward_char (&insert);
@@ -1723,7 +1724,7 @@ ide_source_view_movement_match_search_char (Movement *mv, gboolean is_next_direc
       if (is_inclusive_mode && is_selection_positive)
         gtk_text_iter_backward_char (&insert);
 
-      if (gtk_text_iter_backward_find_char (&insert, find_char, GUINT_TO_POINTER (mv->modifier), &limit))
+      if (gtk_text_iter_backward_find_char (&insert, find_char_predicate, GUINT_TO_POINTER (mv->modifier), 
&limit))
         {
           if (is_till)
             gtk_text_iter_forward_char (&insert);


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