aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/nvim/ex_docmd.c13
-rw-r--r--src/nvim/testdir/test49.vim3
-rw-r--r--src/nvim/testdir/test_cmdline.vim7
-rw-r--r--src/nvim/version.c2
-rw-r--r--test/functional/core/job_spec.lua4
5 files changed, 21 insertions, 8 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
diff --git a/test/functional/core/job_spec.lua b/test/functional/core/job_spec.lua
index b98169b067..54e56f7f41 100644
--- a/test/functional/core/job_spec.lua
+++ b/test/functional/core/job_spec.lua
@@ -9,6 +9,7 @@ local command = helpers.command
local wait = helpers.wait
local iswin = helpers.iswin
local get_pathsep = helpers.get_pathsep
+local nvim_set = helpers.nvim_set
local Screen = require('test.functional.ui.screen')
describe('jobs', function()
@@ -669,9 +670,10 @@ describe("pty process teardown", function()
if helpers.pending_win32(pending) then return end
-- Use a nested nvim (in :term) to test without --headless.
feed_command(":terminal '"..helpers.nvim_prog
+ .."' -u NONE -i NONE --cmd '"..nvim_set.."' "
-- Use :term again in the _nested_ nvim to get a PTY process.
-- Use `sleep` to simulate a long-running child of the PTY.
- .."' +terminal +'!(sleep 300 &)' +qa")
+ .."+terminal +'!(sleep 300 &)' +qa")
-- Exiting should terminate all descendants (PTY, its children, ...).
screen:expect([[