diff options
Diffstat (limited to 'src/nvim/ex_docmd.c')
| -rw-r--r-- | src/nvim/ex_docmd.c | 13 | 
1 files changed, 6 insertions, 7 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c index 80c75f24c4..d7821fc636 100644 --- a/src/nvim/ex_docmd.c +++ b/src/nvim/ex_docmd.c @@ -1665,15 +1665,11 @@ 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; -        // Don't leave the cursor on an illegal line (caused by ';') -        check_cursor_lnum(); -      } -    } else if (*ea.cmd != ',') { +    } else if (*ea.cmd != ',')        break; -    } -    ea.cmd++; +    ++ea.cmd;    }    /* One address given: set start and end lines */ @@ -1684,6 +1680,9 @@ 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.     */  | 
