[gnome-builder] libide: handle rectangle bounds for partial line specially
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: handle rectangle bounds for partial line specially
- Date: Tue, 24 Mar 2015 00:07:03 +0000 (UTC)
commit 1a0ac6538d49585dff4f74d90d92020d133a6a7e
Author: Christian Hergert <christian hergert me>
Date: Sun Mar 8 01:40:38 2015 -0800
libide: handle rectangle bounds for partial line specially
libide/ide-source-view.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/libide/ide-source-view.c b/libide/ide-source-view.c
index 8e79589..1df0f91 100644
--- a/libide/ide-source-view.c
+++ b/libide/ide-source-view.c
@@ -261,12 +261,20 @@ get_rect_for_iters (GtkTextView *text_view,
begin = *iter1;
end = *iter2;
+ if (gtk_text_iter_equal (&begin, &end))
+ goto finish;
+
gtk_text_iter_order (&begin, &end);
- gtk_text_view_get_iter_location (text_view, &begin, &area);
+ if (gtk_text_iter_get_line (&begin) == gtk_text_iter_get_line (&end))
+ {
+ gtk_text_view_get_iter_location (text_view, &begin, &area);
+ gtk_text_view_get_iter_location (text_view, &end, &tmp);
+ gdk_rectangle_union (&area, &tmp, &area);
+ goto finish;
+ }
- if (gtk_text_iter_equal (&begin, &end))
- goto finish;
+ gtk_text_view_get_iter_location (text_view, &begin, &area);
iter = begin;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]