aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorckelsel <ckelsel@hotmail.com>2017-08-03 08:30:53 +0800
committerckelsel <ckelsel@hotmail.com>2017-08-03 08:30:53 +0800
commit9b3ed62b5a841c24f798f1fcc4adb3cfe7667b5b (patch)
tree380648ddb41939724a40eccd780312640203ca01
parentb16a4ad49a010a8a2f1019394396fee5facbbd16 (diff)
parenteb40b7ec404e8651137513ced43d503bc6656f17 (diff)
downloadrneovim-9b3ed62b5a841c24f798f1fcc4adb3cfe7667b5b.tar.gz
rneovim-9b3ed62b5a841c24f798f1fcc4adb3cfe7667b5b.tar.bz2
rneovim-9b3ed62b5a841c24f798f1fcc4adb3cfe7667b5b.zip
Merge remote-tracking branch 'upstream/master'
-rw-r--r--src/nvim/ex_docmd.c13
-rw-r--r--src/nvim/testdir/test_cmdline.vim7
-rw-r--r--src/nvim/version.c2
3 files changed, 15 insertions, 7 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index d7821fc636..80c75f24c4 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/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 1035963136..a018585976 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