[gtksourceview] Don't go forward_to_line_end if already at line end to extend selection
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] Don't go forward_to_line_end if already at line end to extend selection
- Date: Fri, 9 Apr 2010 20:19:53 +0000 (UTC)
commit ee9e8e37a803954478cbc40b71e063168d8804fa
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Fri Apr 9 22:19:43 2010 +0200
Don't go forward_to_line_end if already at line end to extend selection
gtksourceview/gtksourceview.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/gtksourceview.c b/gtksourceview/gtksourceview.c
index fce4b68..8eb058d 100644
--- a/gtksourceview/gtksourceview.c
+++ b/gtksourceview/gtksourceview.c
@@ -1219,7 +1219,9 @@ extend_selection_to_line (GtkTextBuffer *buf, GtkTextIter *line_start)
gtk_text_buffer_get_selection_bounds (buf, &start, &end);
line_end = *line_start;
- gtk_text_iter_forward_to_line_end (&line_end);
+
+ if (!gtk_text_iter_ends_line (&line_end))
+ gtk_text_iter_forward_to_line_end (&line_end);
if (gtk_text_iter_compare (&start, line_start) < 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]