diff options
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r-- | src/nvim/ex_docmd.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index d7821fc636..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. */ @@ -8321,7 +8322,7 @@ static void ex_tag_cmd(exarg_T *eap, char_u *name) break; default: /* ":tag" */ if (p_cst && *eap->arg != NUL) { - do_cstag(eap); + ex_cstag(eap); return; } cmd = DT_TAG; |