[gspell] inline-checker-text-buffer: work around drawing issue with	underline
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gspell] inline-checker-text-buffer: work around drawing issue with	underline
- Date: Thu, 11 Feb 2016 16:55:45 +0000 (UTC)
commit db31377c64cdd8729a1c61b78471fc4fb05d7d75
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Thu Feb 11 17:50:29 2016 +0100
    inline-checker-text-buffer: work around drawing issue with underline
    
    Fixing properly the bug in GtkTextView is more complicated. So in the
    meantime, it's better to have something working well.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=612772
 gspell/gspell-inline-checker-text-buffer.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)
---
diff --git a/gspell/gspell-inline-checker-text-buffer.c b/gspell/gspell-inline-checker-text-buffer.c
index b6c497f..4b2996b 100644
--- a/gspell/gspell-inline-checker-text-buffer.c
+++ b/gspell/gspell-inline-checker-text-buffer.c
@@ -291,6 +291,12 @@ check_visible_region_in_view (GspellInlineCheckerTextBuffer *spell,
                return;
        }
 
+       if (is_text_region_empty (intersect))
+       {
+               _gspell_text_region_destroy (intersect);
+               return;
+       }
+
        _gspell_text_region_get_iterator (intersect, &intersect_iter, 0);
 
        while (!_gspell_text_region_iterator_is_end (&intersect_iter))
@@ -319,6 +325,14 @@ check_visible_region_in_view (GspellInlineCheckerTextBuffer *spell,
                _gspell_text_region_destroy (spell->scan_region);
                spell->scan_region = NULL;
        }
+
+       if (view != NULL)
+       {
+               /* FIXME properly. Workaround for bug in GtkTextView:
+                * https://bugzilla.gnome.org/show_bug.cgi?id=612772
+                */
+               gtk_widget_queue_draw (GTK_WIDGET (view));
+       }
 }
 
 static void
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]