[gnome-builder] vim: fix completion window with ctrl+n/p
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] vim: fix completion window with ctrl+n/p
- Date: Mon, 11 Jun 2018 09:24:21 +0000 (UTC)
commit ea634e464d23e5d2209dd53c693bfdad2c312cff
Author: Christian Hergert <chergert redhat com>
Date: Mon Jun 11 02:10:57 2018 -0700
vim: fix completion window with ctrl+n/p
src/libide/keybindings/vim.css | 3 +++
src/libide/sourceview/ide-source-view.c | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
---
diff --git a/src/libide/keybindings/vim.css b/src/libide/keybindings/vim.css
index d6cbd953b..23663bcc0 100644
--- a/src/libide/keybindings/vim.css
+++ b/src/libide/keybindings/vim.css
@@ -1963,6 +1963,9 @@
bind "<ctrl>e" { "movement" (screen-up, 0, 0, 1) };
bind "<ctrl>y" { "movement" (screen-down, 0, 0, 1) };
+ bind "<ctrl>n" { "cycle-completion" (down) };
+ bind "<ctrl>p" { "cycle-completion" (up) };
+
/* raw keycode (to some degree) */
bind "<ctrl>v" { "capture-modifier" ()
"insert-modifier" (0)
diff --git a/src/libide/sourceview/ide-source-view.c b/src/libide/sourceview/ide-source-view.c
index f6e184b43..b6e43eb9e 100644
--- a/src/libide/sourceview/ide-source-view.c
+++ b/src/libide/sourceview/ide-source-view.c
@@ -2773,7 +2773,10 @@ ide_source_view_real_cycle_completion (IdeSourceView *self,
completion = ide_source_view_get_completion (self);
if (!ide_completion_is_visible (completion))
- return;
+ {
+ ide_completion_show (completion);
+ return;
+ }
switch (direction)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]