[gtksourceview] Make sure to check forward_line result when merging regions
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Make sure to check forward_line result when merging regions
- Date: Wed, 7 Apr 2010 19:39:15 +0000 (UTC)
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, ®ion_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]