aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/edit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r--src/nvim/edit.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c
index 1c33c4d549..614a5d43be 100644
--- a/src/nvim/edit.c
+++ b/src/nvim/edit.c
@@ -2358,13 +2358,13 @@ void set_completion(colnr_T startcol, list_T *list)
int save_w_wrow = curwin->w_wrow;
compl_curr_match = compl_first_match;
- if (compl_no_insert) {
+ if (compl_no_insert || compl_no_select) {
ins_complete(K_DOWN, false);
- } else {
- ins_complete(Ctrl_N, false);
if (compl_no_select) {
- ins_complete(Ctrl_P, false);
+ ins_complete(K_UP, false);
}
+ } else {
+ ins_complete(Ctrl_N, false);
}
// Lazily show the popup menu, unless we got interrupted.
@@ -4239,9 +4239,10 @@ void ins_compl_check_keys(int frequency)
static int ins_compl_key2dir(int c)
{
if (c == Ctrl_P || c == Ctrl_L
- || (pum_visible() && (c == K_PAGEUP || c == K_KPAGEUP
- || c == K_S_UP || c == K_UP)))
+ || c == K_PAGEUP || c == K_KPAGEUP
+ || c == K_S_UP || c == K_UP) {
return BACKWARD;
+ }
return FORWARD;
}