[gnome-builder] movements: work around inconsistencies for 'b' and 'B' in vim
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] movements: work around inconsistencies for 'b' and 'B' in vim
- Date: Fri, 29 Sep 2017 06:20:44 +0000 (UTC)
commit 167800bd4e02e76b4fdd6fd76cf6c8328d77a79e
Author: Christian Hergert <chergert redhat com>
Date: Thu Sep 28 23:20:11 2017 -0700
movements: work around inconsistencies for 'b' and 'B' in vim
These changed behavior which broke b and B in vim mode. Instead of tracking
down exactly why, this commit just restores the previous behavior when the
new parameter should not take effect.
src/libide/sourceview/ide-source-view-movements.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/libide/sourceview/ide-source-view-movements.c
b/src/libide/sourceview/ide-source-view-movements.c
index 9ac0ad5..e3bb37e 100644
--- a/src/libide/sourceview/ide-source-view-movements.c
+++ b/src/libide/sourceview/ide-source-view-movements.c
@@ -1569,7 +1569,10 @@ ide_source_view_movements_previous_word_start (Movement *mv)
copy = mv->insert;
- _ide_text_iter_backward_word_start (&mv->insert, mv->newline_stop);
+ if (mv->newline_stop)
+ _ide_text_iter_backward_word_start (&mv->insert, TRUE);
+ else
+ _ide_source_iter_backward_visible_word_start (&mv->insert);
/*
* Vim treats an empty line as a word.
@@ -1589,7 +1592,10 @@ ide_source_view_movements_previous_full_word_start (Movement *mv)
copy = mv->insert;
- _ide_text_iter_backward_WORD_start (&mv->insert, mv->newline_stop);
+ if (mv->newline_stop)
+ _ide_text_iter_backward_WORD_start (&mv->insert, TRUE);
+ else
+ _ide_source_iter_backward_full_word_start (&mv->insert);
/*
* Vim treats an empty line as a word.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]