To: vim_dev@googlegroups.com Subject: Patch 8.2.2732 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.2732 Problem: Prompt for s///c in Ex mode can be wrong. Solution: Position the cursor before showing the prompt. (closes #8073) Files: src/ex_cmds.c, src/testdir/test_ex_mode.vim *** ../vim-8.2.2731/src/ex_cmds.c 2021-02-06 17:30:26.798546818 +0100 --- src/ex_cmds.c 2021-04-07 19:39:52.858657953 +0200 *************** *** 4153,4158 **** --- 4153,4159 ---- if (curwin->w_cursor.col < 0) curwin->w_cursor.col = 0; getvcol(curwin, &curwin->w_cursor, NULL, NULL, &ec); + curwin->w_cursor.col = regmatch.startpos[0].col; if (subflags.do_number || curwin->w_p_nu) { int numw = number_width(curwin) + 1; *** ../vim-8.2.2731/src/testdir/test_ex_mode.vim 2021-01-28 18:34:27.783630494 +0100 --- src/testdir/test_ex_mode.vim 2021-04-07 19:39:52.858657953 +0200 *************** *** 77,82 **** --- 77,85 ---- call WaitForAssert({-> assert_match(' 1 foo foo', term_getline(buf, 5))}, \ 1000) call WaitForAssert({-> assert_match(' ^^^', term_getline(buf, 6))}, 1000) + call term_sendkeys(buf, "N\") + call term_wait(buf) + call WaitForAssert({-> assert_match(' ^^^', term_getline(buf, 6))}, 1000) call term_sendkeys(buf, "n\") call WaitForAssert({-> assert_match(' ^^^', term_getline(buf, 6))}, \ 1000) *** ../vim-8.2.2731/src/version.c 2021-04-07 19:00:22.448665381 +0200 --- src/version.c 2021-04-07 19:41:41.914382502 +0200 *************** *** 752,753 **** --- 752,755 ---- { /* Add new patch number below this line */ + /**/ + 2732, /**/ -- hundred-and-one symptoms of being an internet addict: 84. Books in your bookcase bear the names Bongo, WinSock and Inside OLE /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///