0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2425: cursor on invalid line with range and :substitute

Problem:    Cursor on invalid line with range and :substitute.
Solution:   Do not move the cursor when skipping commands. (closes #3434)
This commit is contained in:
Bram Moolenaar
2021-01-28 20:18:08 +01:00
parent 97202d9516
commit df2c2988bb
3 changed files with 9 additions and 0 deletions

View File

@@ -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;