diff options
| author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-11-02 11:32:39 -0400 |
|---|---|---|
| committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2019-11-02 12:21:15 -0400 |
| commit | 4a5adae95084e2dbaea59f0cffb9087ec4a6415e (patch) | |
| tree | 936fd72ae937d215c45d20859a0683bb70477c9e /src/nvim/testdir | |
| parent | 63ab994fba2f2e0878be734d20bf8d106ddab67c (diff) | |
| download | rneovim-4a5adae95084e2dbaea59f0cffb9087ec4a6415e.tar.gz rneovim-4a5adae95084e2dbaea59f0cffb9087ec4a6415e.tar.bz2 rneovim-4a5adae95084e2dbaea59f0cffb9087ec4a6415e.zip | |
vim-patch:8.1.2236: ml_get error if pattern matches beyond last line
Problem: Ml_get error if pattern matches beyond last line.
Solution: Adjust position if needed. (Christian Brabandt, closes )
https://github.com/vim/vim/commit/bb26596242fa7db477e2cd706dd99f9a426b5f71
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_substitute.vim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_substitute.vim b/src/nvim/testdir/test_substitute.vim index b29b678129..e209310a05 100644 --- a/src/nvim/testdir/test_substitute.vim +++ b/src/nvim/testdir/test_substitute.vim @@ -149,6 +149,7 @@ func Run_SubCmd_Tests(tests) for t in a:tests let start = line('.') + 1 let end = start + len(t[2]) - 1 + " TODO: why is there a one second delay the first time we get here? exe "normal o" . t[0] call cursor(start, 1) exe t[1] @@ -717,3 +718,12 @@ one two close! endfunc + +func Test_sub_beyond_end() + new + call setline(1, '#') + let @/ = '^#\n\zs' + s///e + call assert_equal('#', getline(1)) + bwipe! +endfunc |