mirror of
https://github.com/neovim/neovim.git
synced 2026-08-28 01:51:52 +00:00
Merge #10323 from janlazo/vim-8.1.1055
vim-patch:8.0.{1479,1480,1482},8.1.1055
This commit is contained in:
@@ -643,11 +643,11 @@ func! Test_edit_CTRL_L()
|
||||
call feedkeys("cct\<c-x>\<c-l>\<c-n>\<esc>", 'tnix')
|
||||
call assert_equal(['one', 'two', 'three', 't', '', '', ''], getline(1, '$'))
|
||||
call feedkeys("cct\<c-x>\<c-l>\<c-n>\<c-n>\<esc>", 'tnix')
|
||||
call assert_equal(['one', 'two', 'three', 't', '', '', ''], getline(1, '$'))
|
||||
call feedkeys("cct\<c-x>\<c-l>\<c-n>\<c-n>\<c-n>\<esc>", 'tnix')
|
||||
call assert_equal(['one', 'two', 'three', 'two', '', '', ''], getline(1, '$'))
|
||||
call feedkeys("cct\<c-x>\<c-l>\<c-n>\<c-n>\<c-n>\<c-n>\<esc>", 'tnix')
|
||||
call feedkeys("cct\<c-x>\<c-l>\<c-n>\<c-n>\<c-n>\<esc>", 'tnix')
|
||||
call assert_equal(['one', 'two', 'three', 'three', '', '', ''], getline(1, '$'))
|
||||
call feedkeys("cct\<c-x>\<c-l>\<c-n>\<c-n>\<c-n>\<c-n>\<esc>", 'tnix')
|
||||
call assert_equal(['one', 'two', 'three', 't', '', '', ''], getline(1, '$'))
|
||||
call feedkeys("cct\<c-x>\<c-l>\<c-p>\<esc>", 'tnix')
|
||||
call assert_equal(['one', 'two', 'three', 'two', '', '', ''], getline(1, '$'))
|
||||
call feedkeys("cct\<c-x>\<c-l>\<c-p>\<c-p>\<esc>", 'tnix')
|
||||
@@ -1408,7 +1408,6 @@ func Test_edit_complete_very_long_name()
|
||||
let save_columns = &columns
|
||||
" Need at least about 1100 columns to reproduce the problem.
|
||||
set columns=2000
|
||||
call assert_equal(2000, &columns)
|
||||
set noswapfile
|
||||
|
||||
let longfilename = longdirname . '/' . repeat('a', 255)
|
||||
|
||||
@@ -249,3 +249,14 @@ func Test_omni_dash()
|
||||
delfunc Omni
|
||||
set omnifunc=
|
||||
endfunc
|
||||
|
||||
" Check that when using feedkeys() typeahead does not interrupt searching for
|
||||
" completions.
|
||||
func Test_compl_feedkeys()
|
||||
new
|
||||
set completeopt=menuone,noselect
|
||||
call feedkeys("ajump ju\<C-X>\<C-N>\<C-P>\<ESC>", "tx")
|
||||
call assert_equal("jump jump", getline(1))
|
||||
bwipe!
|
||||
set completeopt&
|
||||
endfunc
|
||||
|
||||
@@ -187,9 +187,32 @@ func Test_map_cursor()
|
||||
imapclear
|
||||
endfunc
|
||||
|
||||
func Test_map_cursor_ctrl_gU()
|
||||
" <c-g>U<cursor> works only within a single line
|
||||
nnoremap c<* *Ncgn<C-r>"<C-G>U<S-Left>
|
||||
call setline(1, ['foo', 'foobar', '', 'foo'])
|
||||
call cursor(1,2)
|
||||
call feedkeys("c<*PREFIX\<esc>.", 'xt')
|
||||
call assert_equal(['PREFIXfoo', 'foobar', '', 'PREFIXfoo'], getline(1,'$'))
|
||||
" break undo manually
|
||||
set ul=1000
|
||||
exe ":norm! uu"
|
||||
call assert_equal(['foo', 'foobar', '', 'foo'], getline(1,'$'))
|
||||
|
||||
" Test that it does not work if the cursor moves to the previous line
|
||||
" 2 times <S-Left> move to the previous line
|
||||
nnoremap c<* *Ncgn<C-r>"<C-G>U<S-Left><C-G>U<S-Left>
|
||||
call setline(1, ['', ' foo', 'foobar', '', 'foo'])
|
||||
call cursor(2,3)
|
||||
call feedkeys("c<*PREFIX\<esc>.", 'xt')
|
||||
call assert_equal(['PREFIXPREFIX', ' foo', 'foobar', '', 'foo'], getline(1,'$'))
|
||||
nmapclear
|
||||
endfunc
|
||||
|
||||
|
||||
" This isn't actually testing a mapping, but similar use of CTRL-G U as above.
|
||||
func Test_break_undo()
|
||||
:set whichwrap=<,>,[,]
|
||||
set whichwrap=<,>,[,]
|
||||
call feedkeys("G4o2k", "xt")
|
||||
exe ":norm! iTest3: text with a (parenthesis here\<C-G>U\<Right>new line here\<esc>\<up>\<up>."
|
||||
call assert_equal('new line here', getline(line('$') - 3))
|
||||
|
||||
@@ -641,7 +641,7 @@ func Test_popup_and_preview_autocommand()
|
||||
norm! gt
|
||||
call assert_equal(0, &previewwindow)
|
||||
norm! gT
|
||||
call assert_equal(12, tabpagenr('$'))
|
||||
call assert_equal(10, tabpagenr('$'))
|
||||
tabonly
|
||||
pclose
|
||||
augroup MyBufAdd
|
||||
|
||||
Reference in New Issue
Block a user