Fix: iMap <Cr> Interfere in completion (alias popup-menu, pum) (Issue: #813)
Problem: When pum opened, the mapping of <CR> is triggered but user want the default behaviour: to choose a completion item Solution: Conditional mapping: inoremap <expr><silent><buffer> <CR> pumvisible() ? '<CR>' : ':<Esc>:VimwikiReturn 1 5<Cr>' The previous mapping -----------------^
This commit is contained in:
@ -114,9 +114,11 @@ Do (,w,m -> open tomorrow [Assert]):
|
||||
Execute (===========================================================):
|
||||
Log "Checking local map"
|
||||
|
||||
|
||||
# 2.1 Heading {{{2
|
||||
##############
|
||||
|
||||
|
||||
Do (,wn -> Create new wiki [Assert]):
|
||||
,wn
|
||||
new_file1
|
||||
@ -293,6 +295,24 @@ Expect (Dec header level):
|
||||
# 2.2 List {{{2
|
||||
##############
|
||||
|
||||
|
||||
|
||||
Given vimwiki (Completion list #813 {{{3):
|
||||
complete1
|
||||
complete2
|
||||
complete3
|
||||
|
||||
Do (Insert a list item and complete):
|
||||
Go
|
||||
* comp\<C-n>\<Down>\<Cr>
|
||||
|
||||
Expect (With a completion but no new item):
|
||||
complete1
|
||||
complete2
|
||||
complete3
|
||||
* complete2
|
||||
|
||||
|
||||
Given (Number list):
|
||||
1. I
|
||||
1. Relly
|
||||
|
Reference in New Issue
Block a user