[gnome-builder] libide: only run exclusive on last run for paragraph
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] libide: only run exclusive on last run for paragraph
- Date: Tue, 24 Mar 2015 00:06:02 +0000 (UTC)
commit 0c9d5fd4f575cdb879f6824eeb5ca70d8d97462e
Author: Christian Hergert <christian hergert me>
Date: Fri Mar 6 20:49:05 2015 -0800
libide: only run exclusive on last run for paragraph
libide/ide-source-view-movements.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/libide/ide-source-view-movements.c b/libide/ide-source-view-movements.c
index cd3f62c..99f4310 100644
--- a/libide/ide-source-view-movements.c
+++ b/libide/ide-source-view-movements.c
@@ -1167,13 +1167,19 @@ _ide_source_view_apply_movement (IdeSourceView *self,
break;
case IDE_SOURCE_VIEW_MOVEMENT_PARAGRAPH_START:
- for (i = 0; i < MAX (1, mv.count); i++)
- ide_source_view_movements_paragraph_start (&mv);
+ for (i = MAX (1, mv.count); i > 0; i--)
+ {
+ mv.exclusive = exclusive && i == 1;
+ ide_source_view_movements_paragraph_start (&mv);
+ }
break;
case IDE_SOURCE_VIEW_MOVEMENT_PARAGRAPH_END:
- for (i = 0; i < MAX (1, mv.count); i++)
- ide_source_view_movements_paragraph_end (&mv);
+ for (i = MAX (1, mv.count); i > 0; i--)
+ {
+ mv.exclusive = exclusive && i == 1;
+ ide_source_view_movements_paragraph_end (&mv);
+ }
break;
case IDE_SOURCE_VIEW_MOVEMENT_PREVIOUS_LINE:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]