mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
parent
890ce792af
commit
0b468fd0cf
@ -165,10 +165,6 @@ static int compl_restarting = FALSE; /* don't insert match */
|
||||
* FALSE the word to be completed must be located. */
|
||||
static int compl_started = FALSE;
|
||||
|
||||
/* Set when doing something for completion that may call edit() recursively,
|
||||
* which is not allowed. */
|
||||
static int compl_busy = FALSE;
|
||||
|
||||
static int compl_matches = 0;
|
||||
static char_u *compl_pattern = NULL;
|
||||
static int compl_direction = FORWARD;
|
||||
|
@ -762,6 +762,10 @@ void clearFolding(win_T *win)
|
||||
*/
|
||||
void foldUpdate(win_T *wp, linenr_T top, linenr_T bot)
|
||||
{
|
||||
if (compl_busy) {
|
||||
return;
|
||||
}
|
||||
|
||||
fold_T *fp;
|
||||
if (wp->w_buffer->terminal) {
|
||||
return;
|
||||
|
@ -214,6 +214,10 @@ EXTERN int compl_length INIT(= 0);
|
||||
* stop looking for matches. */
|
||||
EXTERN int compl_interrupted INIT(= FALSE);
|
||||
|
||||
// Set when doing something for completion that may call edit() recursively,
|
||||
// which is not allowed. Also used to disable folding during completion
|
||||
EXTERN int compl_busy INIT(= false);
|
||||
|
||||
/* List of flags for method of completion. */
|
||||
EXTERN int compl_cont_status INIT(= 0);
|
||||
# define CONT_ADDING 1 /* "normal" or "adding" expansion */
|
||||
|
@ -141,4 +141,10 @@ describe('completion', function()
|
||||
June]])
|
||||
end)
|
||||
end)
|
||||
|
||||
it('disables folding during completion', function ()
|
||||
execute("set foldmethod=indent")
|
||||
feed('i<Tab>foo<CR><Tab>bar<Esc>ggA<C-x><C-l>')
|
||||
eq(-1, eval('foldclosed(1)'))
|
||||
end)
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user