fix(keywordprg): retain terminal buffer after K (#17046)

This commit is contained in:
Daniel Steinberg
2022-01-13 00:04:30 -05:00
committed by GitHub
parent 39a35dd006
commit 3ee1ba35a7
2 changed files with 24 additions and 5 deletions

View File

@@ -4437,11 +4437,7 @@ static void nv_ident(cmdarg_T *cap)
// Start insert mode in terminal buffer
restart_edit = 'i';
add_map((char_u *)"<buffer> <esc> <Cmd>call jobstop(&channel)<CR>", TERM_FOCUS, true);
do_cmdline_cmd("autocmd TermClose <buffer> "
" if !v:event.status |"
" exec 'bdelete! ' .. expand('<abuf>') |"
" endif");
add_map((char_u *)"<buffer> <esc> <Cmd>bdelete!<CR>", TERM_FOCUS, true);
}
}