mirror of
https://github.com/neovim/neovim.git
synced 2024-09-17 20:58:20 -04:00
vim-patch:9.1.0634: Ctrl-P not working by default
Problem: Ctrl-P not working by default
(Jesse Pavel, after v9.1.0598)
Solution: Revert part of v9.1.0598 and set cur_match_pos
correctly according to compl_dir_forward()
fixes: vim/vim#15370
closes: vim/vim#15379
13032a49b7
Co-authored-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
85328ac139
commit
0b1751f7f8
@ -3592,11 +3592,7 @@ static int ins_compl_get_exp(pos_T *ini)
|
|||||||
assert(st.ins_buf != NULL);
|
assert(st.ins_buf != NULL);
|
||||||
|
|
||||||
compl_old_match = compl_curr_match; // remember the last current match
|
compl_old_match = compl_curr_match; // remember the last current match
|
||||||
if (in_fuzzy) {
|
st.cur_match_pos = compl_dir_forward() ? &st.last_match_pos : &st.first_match_pos;
|
||||||
st.cur_match_pos = compl_dir_forward() ? &st.last_match_pos : &st.first_match_pos;
|
|
||||||
} else {
|
|
||||||
st.cur_match_pos = &st.last_match_pos;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For ^N/^P loop over all the flags/windows/buffers in 'complete'
|
// For ^N/^P loop over all the flags/windows/buffers in 'complete'
|
||||||
while (true) {
|
while (true) {
|
||||||
|
@ -2773,4 +2773,14 @@ func Test_complete_fuzzy_match_tie()
|
|||||||
set completeopt&
|
set completeopt&
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_complete_backwards_default()
|
||||||
|
new
|
||||||
|
call append(1, ['foobar', 'foobaz'])
|
||||||
|
new
|
||||||
|
call feedkeys("i\<c-p>", 'tx')
|
||||||
|
call assert_equal('foobaz', getline('.'))
|
||||||
|
bw!
|
||||||
|
bw!
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
|
" vim: shiftwidth=2 sts=2 expandtab nofoldenable
|
||||||
|
Loading…
Reference in New Issue
Block a user