[gnome-builder] libide: fix ctrl+u at first nonspace char
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: fix ctrl+u at first nonspace char
- Date: Tue, 24 Mar 2015 00:06:08 +0000 (UTC)
commit f092e9f32d87a170006e520833f32a6508ce7ffc
Author: Christian Hergert <christian hergert me>
Date: Fri Mar 6 21:01:07 2015 -0800
libide: fix ctrl+u at first nonspace char
libide/ide-source-view-movements.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-source-view-movements.c b/libide/ide-source-view-movements.c
index 99f4310..643d600 100644
--- a/libide/ide-source-view-movements.c
+++ b/libide/ide-source-view-movements.c
@@ -305,6 +305,8 @@ ide_source_view_movements_first_nonspace_char (Movement *mv)
static void
ide_source_view_movements_line_chars (Movement *mv)
{
+ GtkTextIter orig = mv->insert;
+
/*
* Selects the current position up to the first nonspace character.
* If the cursor is at the line start, we will select the newline.
@@ -326,7 +328,8 @@ ide_source_view_movements_line_chars (Movement *mv)
g_unichar_isspace (ch))
gtk_text_iter_forward_char (&mv->insert);
- if (gtk_text_iter_ends_line (&mv->insert))
+ if (gtk_text_iter_ends_line (&mv->insert) ||
+ (gtk_text_iter_compare (&orig, &mv->insert) <= 0))
gtk_text_iter_set_line_offset (&mv->insert, 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]