[gnome-builder] plugins/spellcheck: fix region invalidation when applying checker



commit 85cbc9e70fdcdaa101ac204af02d65579ec30973
Author: Christian Hergert <chergert redhat com>
Date:   Tue Sep 27 12:21:57 2022 -0700

    plugins/spellcheck: fix region invalidation when applying checker
    
    Fixes #1818

 src/plugins/spellcheck/editor-text-buffer-spell-adapter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/plugins/spellcheck/editor-text-buffer-spell-adapter.c 
b/src/plugins/spellcheck/editor-text-buffer-spell-adapter.c
index c1ba6738e..916129a07 100644
--- a/src/plugins/spellcheck/editor-text-buffer-spell-adapter.c
+++ b/src/plugins/spellcheck/editor-text-buffer-spell-adapter.c
@@ -658,7 +658,7 @@ editor_text_buffer_spell_adapter_set_checker (EditorTextBufferSpellAdapter *self
 
       if (length > 0)
         {
-          _cjh_text_region_remove (self->region, 0, length - 1);
+          _cjh_text_region_remove (self->region, 0, length);
           _cjh_text_region_insert (self->region, 0, length, RUN_UNCHECKED);
           g_assert_cmpint (length, ==, _cjh_text_region_get_length (self->region));
         }


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