[gnome-builder/wip/libide] libide: deal with exclusive/inclusive in first-nonspace-char movement
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/libide] libide: deal with exclusive/inclusive in first-nonspace-char movement
- Date: Fri, 6 Mar 2015 20:41:30 +0000 (UTC)
commit 524b5c5f162d67a3ac01f17754564fab0509d3e6
Author: Christian Hergert <christian hergert me>
Date: Fri Mar 6 12:41:14 2015 -0800
libide: deal with exclusive/inclusive in first-nonspace-char movement
libide/ide-source-view-movements.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/libide/ide-source-view-movements.c b/libide/ide-source-view-movements.c
index 0140c43..e9440ad 100644
--- a/libide/ide-source-view-movements.c
+++ b/libide/ide-source-view-movements.c
@@ -182,12 +182,16 @@ ide_source_view_movements_first_nonspace_char (Movement *mv)
{
gunichar ch;
- gtk_text_iter_set_line_offset (&mv->insert, 0);
+ if (gtk_text_iter_get_line_offset (&mv->insert) != 0)
+ gtk_text_iter_set_line_offset (&mv->insert, 0);
while (!gtk_text_iter_ends_line (&mv->insert) &&
(ch = gtk_text_iter_get_char (&mv->insert)) &&
g_unichar_isspace (ch))
gtk_text_iter_forward_char (&mv->insert);
+
+ if (!mv->exclusive && !gtk_text_iter_ends_line (&mv->insert))
+ gtk_text_iter_forward_char (&mv->insert);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]