aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-08-05 00:17:59 +0200
committerGitHub <noreply@github.com>2017-08-05 00:17:59 +0200
commit37dd5ded7c74d70358ab0539d6ed978816b778f5 (patch)
tree1d5bb4969bcf901e9d1ecd8472856f9c93883c66 /src/nvim/ex_docmd.c
parent36a91c790e5b58a002ca20671a357d8a0ffd2dff (diff)
parent678e87b90a08915d4fc16e3aada133f6482ba7a3 (diff)
downloadrneovim-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/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c13
1 files changed, 7 insertions, 6 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.
*/