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/nvim/ex_docmd.c | |
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/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 13 |
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. */ |