Merge #7111 from justinmk/unrevert

Unrevert 	vim-patch:8.0.0133
This commit is contained in:
Justin M. Keyes 2017-08-05 00:17:59 +02:00 committed by GitHub
commit 37dd5ded7c
5 changed files with 21 additions and 8 deletions

View File

@ -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.
*/

View File

@ -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

View File

@ -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

View File

@ -596,7 +596,7 @@ static const int included_patches[] = {
136,
135,
// 134,
// 133,
133,
// 132,
// 131,
// 130 NA

View File

@ -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([[