[gnome-builder] quick-highlight: no need to check for NULL text
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] quick-highlight: no need to check for NULL text
- Date: Sun, 25 Sep 2016 05:10:48 +0000 (UTC)
commit f13fa4f8fc65cfa54d761e3178c7188a44a37c27
Author: Christian Hergert <chergert redhat com>
Date: Sat Sep 24 22:09:54 2016 -0700
quick-highlight: no need to check for NULL text
.../gbp-quick-highlight-view-addin.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/plugins/quick-highlight/gbp-quick-highlight-view-addin.c
b/plugins/quick-highlight/gbp-quick-highlight-view-addin.c
index 4a8da14..11c3068 100644
--- a/plugins/quick-highlight/gbp-quick-highlight-view-addin.c
+++ b/plugins/quick-highlight/gbp-quick-highlight-view-addin.c
@@ -114,7 +114,9 @@ gbp_quick_highlight_view_addin_match (GtkTextBuffer *buffer,
{
text = gtk_text_buffer_get_text (buffer, &begin, &end, FALSE);
- if (text != NULL && g_strstrip (text) != NULL)
+ g_strstrip (text);
+
+ if (text[0])
{
gtk_source_search_settings_set_search_text (self->search_settings, text);
gtk_source_search_context_set_highlight (self->search_context, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]