Skip to content

Commit c375967

Browse files
committed
fix(keymap): add fallback action to <C-y> mapping
Add missing fallback to preserve the default behavior. See :h i_CTRL-Y and :h complete_CTRL-Y
1 parent 2665197 commit c375967

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

doc/configuration/keymap.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ Set the preset to `'none'` to disable the presets
9292
```lua
9393
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
9494
['<C-e>'] = { 'hide', 'fallback' },
95-
['<C-y>'] = { 'select_and_accept' },
95+
['<C-y>'] = { 'select_and_accept', 'fallback' },
9696

9797
['<Up>'] = { 'select_prev', 'fallback' },
9898
['<Down>'] = { 'select_next', 'fallback' },

doc/modes/cmdline.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Set via `cmdline.keymap.preset = 'cmdline'`, which is the default. Set to `'none
4343
['<Right>'] = { 'select_next', 'fallback' },
4444
['<Left>'] = { 'select_prev', 'fallback' },
4545

46-
['<C-y>'] = { 'select_and_accept' },
46+
['<C-y>'] = { 'select_and_accept', 'fallback' },
4747
['<C-e>'] = { 'cancel', 'fallback' },
4848
}
4949
```

lua/blink/cmp/config/keymap.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
--- {
3535
--- ['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
3636
--- ['<C-e>'] = { 'cancel', 'fallback' },
37-
--- ['<C-y>'] = { 'select_and_accept' },
37+
--- ['<C-y>'] = { 'select_and_accept', 'fallback' },
3838
---
3939
--- ['<Up>'] = { 'select_prev', 'fallback' },
4040
--- ['<Down>'] = { 'select_next', 'fallback' },
@@ -61,7 +61,7 @@
6161
--- ['<C-n>'] = { 'select_next' },
6262
--- ['<C-p>'] = { 'select_prev' },
6363
---
64-
--- ['<C-y>'] = { 'select_and_accept' },
64+
--- ['<C-y>'] = { 'select_and_accept', 'fallback' },
6565
--- ['<C-e>'] = { 'cancel', 'fallback' },
6666
--- }
6767
--- ```

lua/blink/cmp/keymap/presets.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ local presets_keymaps = {
77
default = {
88
['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
99
['<C-e>'] = { 'cancel', 'fallback' },
10-
['<C-y>'] = { 'select_and_accept' },
10+
['<C-y>'] = { 'select_and_accept', 'fallback' },
1111

1212
['<Up>'] = { 'select_prev', 'fallback' },
1313
['<Down>'] = { 'select_next', 'fallback' },
@@ -34,7 +34,7 @@ local presets_keymaps = {
3434
['<Right>'] = { 'select_next', 'fallback' },
3535
['<Left>'] = { 'select_prev', 'fallback' },
3636

37-
['<C-y>'] = { 'select_and_accept' },
37+
['<C-y>'] = { 'select_and_accept', 'fallback' },
3838
['<C-e>'] = { 'cancel', 'fallback' },
3939
['<End>'] = { 'hide', 'fallback' },
4040
},

0 commit comments

Comments
 (0)