[gnome-builder/wip/libide] libide: handle rectangle bounds for partial line specially
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: handle rectangle bounds for partial line specially
- Date: Sun, 8 Mar 2015 09:40:46 +0000 (UTC)
commit daa476e17a7a476fd3f34a377fed1f0b4d9746a2
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]