mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
Merge pull request #18421 from neovim/backport-18418-to-release-0.7
[Backport release-0.7] vim-patch:8.2.4865: :startinsert right after :stopinsert may not work
This commit is contained in:
@@ -553,7 +553,7 @@ static int insert_check(VimState *state)
|
|||||||
Insstart_orig = Insstart;
|
Insstart_orig = Insstart;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stop_insert_mode && !pum_visible()) {
|
if (stop_insert_mode && !compl_started) {
|
||||||
// ":stopinsert" used or 'insertmode' reset
|
// ":stopinsert" used or 'insertmode' reset
|
||||||
s->count = 0;
|
s->count = 0;
|
||||||
return 0; // exit insert mode
|
return 0; // exit insert mode
|
||||||
|
@@ -516,6 +516,15 @@ func Test_pum_stopped_by_timer()
|
|||||||
call delete('Xpumscript')
|
call delete('Xpumscript')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_complete_stopinsert_startinsert()
|
||||||
|
nnoremap <F2> <Cmd>startinsert<CR>
|
||||||
|
inoremap <F2> <Cmd>stopinsert<CR>
|
||||||
|
" This just checks if this causes an error
|
||||||
|
call feedkeys("i\<C-X>\<C-N>\<F2>\<F2>", 'x')
|
||||||
|
nunmap <F2>
|
||||||
|
iunmap <F2>
|
||||||
|
endfunc
|
||||||
|
|
||||||
func Test_pum_with_folds_two_tabs()
|
func Test_pum_with_folds_two_tabs()
|
||||||
CheckScreendump
|
CheckScreendump
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user