[gnome-builder] vim: Respect count in paragraph motions
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: Respect count in paragraph motions
- Date: Thu, 9 Oct 2014 22:46:56 +0000 (UTC)
commit 1b22b67f2ac6660795535c20d326f647bbd10e5e
Author: Florian Müllner <fmuellner gnome org>
Date: Mon Oct 6 13:51:40 2014 +0200
vim: Respect count in paragraph motions
Gah, missed that in commit c5fd8bce0 ...
https://bugzilla.gnome.org/show_bug.cgi?id=737971
src/editor/gb-editor-vim.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/editor/gb-editor-vim.c b/src/editor/gb-editor-vim.c
index 0c19844..b8526d6 100644
--- a/src/editor/gb-editor-vim.c
+++ b/src/editor/gb-editor-vim.c
@@ -3704,9 +3704,14 @@ gb_editor_vim_cmd_backward_paragraph (GbEditorVim *vim,
guint count,
gchar modifier)
{
+ guint i;
+
g_assert (GB_IS_EDITOR_VIM (vim));
- gb_editor_vim_move_backward_paragraph (vim);
+ count = MAX (1, count);
+
+ for (i = 0; i < count; i++)
+ gb_editor_vim_move_backward_paragraph (vim);
}
static void
@@ -3714,9 +3719,14 @@ gb_editor_vim_cmd_forward_paragraph (GbEditorVim *vim,
guint count,
gchar modifier)
{
+ guint i;
+
g_assert (GB_IS_EDITOR_VIM (vim));
- gb_editor_vim_move_forward_paragraph (vim);
+ count = MAX (1, count);
+
+ for (i = 0; i < count; i++)
+ gb_editor_vim_move_forward_paragraph (vim);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]