To: vim_dev@googlegroups.com Subject: Patch 8.2.2425 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2425 Problem: Cursor on invalid line with range and :substitute. Solution: Do not move the cursor when skipping commands. (closes #3434) Files: src/ex_cmds.c, src/testdir/test_eval_stuff.vim *** ../vim-8.2.2424/src/ex_cmds.c 2021-01-16 14:34:42.219758927 +0100 --- src/ex_cmds.c 2021-01-28 20:17:44.512699986 +0100 *************** *** 3747,3752 **** --- 3747,3754 ---- { linenr_T joined_lines_count; + if (eap->skip) + return; curwin->w_cursor.lnum = eap->line1; if (*cmd == 'l') eap->flags = EXFLAG_LIST; *** ../vim-8.2.2424/src/testdir/test_eval_stuff.vim 2021-01-21 21:42:09.409150461 +0100 --- src/testdir/test_eval_stuff.vim 2021-01-28 20:16:33.064941445 +0100 *************** *** 68,73 **** --- 68,78 ---- call assert_fails("for x in 99", 'E714:') call assert_fails("for x in 'asdf'", 'E714:') call assert_fails("for x in {'a': 9}", 'E714:') + + if 0 + /1/5/2/s/\n + endif + redraw endfunc func Test_readfile_binary() *** ../vim-8.2.2424/src/version.c 2021-01-28 18:34:27.783630494 +0100 --- src/version.c 2021-01-28 19:52:56.885977337 +0100 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2425, /**/ -- hundred-and-one symptoms of being an internet addict: 262. Your computer has it's own phone line - but your daughter doesn't. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///