// remove the double quote
redrawcmd();
- // The text has been stuffed, the command line didn't change yet, but it
- // will change soon. The caller must take care of it.
- return literally ? CMDLINE_NOT_CHANGED : CMDLINE_CHANGED;
+ // With "literally": the command line has already changed.
+ // Else: the text has been stuffed, but the command line didn't change yet.
+ return literally ? CMDLINE_CHANGED : CMDLINE_NOT_CHANGED;
}
/*
res = cmdline_insert_reg(&gotesc);
if (res == GOTO_NORMAL_MODE)
goto returncmd;
-#ifdef FEAT_SEARCH_EXTRA
- if (res == CMDLINE_NOT_CHANGED)
- is_state.incsearch_postponed = TRUE;
-#endif
+ if (res == CMDLINE_CHANGED)
+ goto cmdline_changed;
goto cmdline_not_changed;
case Ctrl_D:
call assert_equal(':', g:entered)
au! CmdlineChanged
+ autocmd CmdlineChanged : let g:log += [getcmdline()]
+
let g:log = []
cnoremap <F1> <Cmd>call setcmdline('ls')<CR>
- autocmd CmdlineChanged : let g:log += [getcmdline()]
call feedkeys(":\<F1>", 'xt')
call assert_equal(['ls'], g:log)
- unlet g:log
- au! CmdlineChanged
cunmap <F1>
let g:log = []
- autocmd CmdlineChanged : let g:log += [getcmdline()]
call feedkeys(":sign \<Tab>\<Tab>\<C-N>\<C-P>\<S-Tab>\<S-Tab>\<Esc>", 'xt')
call assert_equal([
\ 's',
\ 'sign unplace',
\ ], g:log)
set wildmenu& wildoptions&
+
+ let g:log = []
+ let @r = 'abc'
+ call feedkeys(":0\<C-R>r1\<C-R>\<C-O>r2\<C-R>\<C-R>r3\<Esc>", 'xt')
+ call assert_equal([
+ \ '0',
+ \ '0a',
+ \ '0ab',
+ \ '0abc',
+ \ '0abc1',
+ \ '0abc1abc',
+ \ '0abc1abc2',
+ \ '0abc1abc2abc',
+ \ '0abc1abc2abc3',
+ \ ], g:log)
+
unlet g:log
au! CmdlineChanged