[gnome-builder/wip/chergert/grep: 6/10] grep: skip past empty text



commit e0f6a8edaaddeea61c734434c34119a8bd168b43
Author: Christian Hergert <chergert redhat com>
Date:   Fri Oct 26 18:17:46 2018 -0700

    grep: skip past empty text

 src/plugins/grep/gbp-grep-panel.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/plugins/grep/gbp-grep-panel.c b/src/plugins/grep/gbp-grep-panel.c
index c91d60db7..6e171f73e 100644
--- a/src/plugins/grep/gbp-grep-panel.c
+++ b/src/plugins/grep/gbp-grep-panel.c
@@ -110,6 +110,8 @@ match_data_func (GtkCellLayout   *layout,
                * the lifetime of the GValue here. Let's us avoid
                * an unnecessary copy.
                */
+              while (*tmp && g_unichar_isspace (g_utf8_get_char (tmp)))
+                tmp = g_utf8_next_char (tmp);
               g_value_set_static_string (&dst, tmp);
               break;
             }


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