diff options
author | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-11-01 22:51:40 -0400 |
---|---|---|
committer | Jan Edmund Lazo <janedmundlazo@hotmail.com> | 2018-11-01 23:20:06 -0400 |
commit | a9b7debbbc7c0190324523710ea7e6ed6070222c (patch) | |
tree | 26182af1783205264b98222457a5cf1abc375576 /src/nvim/testdir | |
parent | 44c111e49f4c7c015bf66855fd6f2f69f1e02c07 (diff) | |
download | rneovim-a9b7debbbc7c0190324523710ea7e6ed6070222c.tar.gz rneovim-a9b7debbbc7c0190324523710ea7e6ed6070222c.tar.bz2 rneovim-a9b7debbbc7c0190324523710ea7e6ed6070222c.zip |
vim-patch:8.0.1766: expanding abbreviation doesn't work
Problem: Expanding abbreviation doesn't work. (Tooth Pik)
Solution: Return OK instead of FALSE and FAIL instead of TRUE. (Christian
Brabandt)
https://github.com/vim/vim/commit/c3c3e698966fac86dee94799b70947defb85440d
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r-- | src/nvim/testdir/test_mapping.vim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_mapping.vim b/src/nvim/testdir/test_mapping.vim index 071b8b369b..247c01c98d 100644 --- a/src/nvim/testdir/test_mapping.vim +++ b/src/nvim/testdir/test_mapping.vim @@ -214,3 +214,19 @@ func Test_cabbr_visual_mode() call assert_equal(expected, getreg(':')) cunabbr s endfunc + +func Test_abbreviation_CR() + new + func Eatchar(pat) + let c = nr2char(getchar(0)) + return (c =~ a:pat) ? '' : c + endfunc + iabbrev <buffer><silent> ~~7 <c-r>=repeat('~', 7)<CR><c-r>=Eatchar('\s')<cr> + call feedkeys("GA~~7 \<esc>", 'xt') + call assert_equal('~~~~~~~', getline('$')) + %d + call feedkeys("GA~~7\<cr>\<esc>", 'xt') + call assert_equal(['~~~~~~~', ''], getline(1,'$')) + delfunc Eatchar + bw! +endfunc |