diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-08-05 00:17:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-05 00:17:59 +0200 |
commit | 37dd5ded7c74d70358ab0539d6ed978816b778f5 (patch) | |
tree | 1d5bb4969bcf901e9d1ecd8472856f9c93883c66 /src | |
parent | 36a91c790e5b58a002ca20671a357d8a0ffd2dff (diff) | |
parent | 678e87b90a08915d4fc16e3aada133f6482ba7a3 (diff) | |
download | rneovim-37dd5ded7c74d70358ab0539d6ed978816b778f5.tar.gz rneovim-37dd5ded7c74d70358ab0539d6ed978816b778f5.tar.bz2 rneovim-37dd5ded7c74d70358ab0539d6ed978816b778f5.zip |
Merge #7111 from justinmk/unrevert
Unrevert vim-patch:8.0.0133
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/ex_docmd.c | 13 | ||||
-rw-r--r-- | src/nvim/testdir/test49.vim | 3 | ||||
-rw-r--r-- | src/nvim/testdir/test_cmdline.vim | 7 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
4 files changed, 18 insertions, 7 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 30156621d6..d1ce589db1 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -1665,11 +1665,15 @@ static char_u * do_one_cmd(char_u **cmdlinep, ea.addr_count++; if (*ea.cmd == ';') { - if (!ea.skip) + if (!ea.skip) { curwin->w_cursor.lnum = ea.line2; - } else if (*ea.cmd != ',') + // Don't leave the cursor on an illegal line (caused by ';') + check_cursor_lnum(); + } + } else if (*ea.cmd != ',') { break; - ++ea.cmd; + } + ea.cmd++; } /* One address given: set start and end lines */ @@ -1680,9 +1684,6 @@ static char_u * do_one_cmd(char_u **cmdlinep, ea.addr_count = 0; } - /* Don't leave the cursor on an illegal line (caused by ';') */ - check_cursor_lnum(); - /* * 5. Parse the command. */ diff --git a/src/nvim/testdir/test49.vim b/src/nvim/testdir/test49.vim index 467abcd9b9..a0e170dea4 100644 --- a/src/nvim/testdir/test49.vim +++ b/src/nvim/testdir/test49.vim @@ -481,9 +481,12 @@ function! ExtraVim(...) bwipeout let g:Xpath = g:Xpath + sum + " FIXME(nvim): delete() of a file used by a subprocess hangs TSAN build on travis CI. + if !empty($TRAVIS) " Delete the extra script and the resultfile. call delete(extra_script) call delete(resultfile) + endif " Switch back to the buffer that was active when this function was entered. exec "buffer" current_buffnr diff --git a/src/nvim/testdir/test_cmdline.vim b/src/nvim/testdir/test_cmdline.vim index c3bfae1b7b..09f4b942ad 100644 --- a/src/nvim/testdir/test_cmdline.vim +++ b/src/nvim/testdir/test_cmdline.vim @@ -232,3 +232,10 @@ func Test_paste_in_cmdline() call assert_equal('"aaa a;b-c*d bbb', @:) bwipe! endfunc + +func Test_illegal_address() + new + 2;'( + 2;') + quit +endfunc diff --git a/src/nvim/version.c b/src/nvim/version.c index c68bc6351e..7f0b45e896 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -596,7 +596,7 @@ static const int included_patches[] = { 136, 135, // 134, - // 133, + 133, // 132, // 131, // 130 NA |