[gtksourceview] Make sure to check forward_line result when merging regions



commit 6e57ca8ee20dbb064a8032245c06f0e7ac103b7d
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Wed Apr 7 21:39:03 2010 +0200

    Make sure to check forward_line result when merging regions
    
    This fixes a small bug where the regions are incorrectly resized,
    resulting in false rescans

 .../words/gtksourcecompletionwordsbuffer.c         |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/completion-providers/words/gtksourcecompletionwordsbuffer.c b/gtksourceview/completion-providers/words/gtksourcecompletionwordsbuffer.c
index 675736d..c4af660 100644
--- a/gtksourceview/completion-providers/words/gtksourcecompletionwordsbuffer.c
+++ b/gtksourceview/completion-providers/words/gtksourcecompletionwordsbuffer.c
@@ -605,7 +605,11 @@ remove_and_rescan (GtkSourceCompletionWordsBuffer *buffer,
 		else if (gtk_text_iter_compare (&startc, &region_end) < 0)
 		{
 			startc = region_end;
-			gtk_text_iter_forward_line (&startc);
+
+			if (!gtk_text_iter_forward_line (&startc))
+			{
+				return;
+			}
 		}
 
 		if (gtk_text_iter_compare (&startc, &endc) > 0)



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