diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-01-28 20:18:08 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-01-28 20:18:08 +0100 |
commit | df2c2988bbaecd28b0fbec8d64327b1bbb005e19 (patch) | |
tree | 8dea246c6df12a4591b94a69cc368a6bf1caccd3 /src/ex_cmds.c | |
parent | 97202d951685fc4d90085da676a90644cbf72571 (diff) | |
download | vim-git-df2c2988bbaecd28b0fbec8d64327b1bbb005e19.tar.gz |
patch 8.2.2425: cursor on invalid line with range and :substitutev8.2.2425
Problem: Cursor on invalid line with range and :substitute.
Solution: Do not move the cursor when skipping commands. (closes #3434)
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r-- | src/ex_cmds.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c index 545e06dbd..12219e7ba 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3747,6 +3747,8 @@ ex_substitute(exarg_T *eap) { linenr_T joined_lines_count; + if (eap->skip) + return; curwin->w_cursor.lnum = eap->line1; if (*cmd == 'l') eap->flags = EXFLAG_LIST; |