Hi vim! On Fr, 11 Jan 2013, [email protected] wrote:
> Status: New > Owner: ---- > Labels: Type-Defect Priority-Medium > > New issue 102 by [email protected]: Cursor at incorrect location > after doing substitution %s/x/y/c when file contains folds > http://code.google.com/p/vim/issues/detail?id=102 > > Bug summary: > > Cursor is at the wrong location and below the end of the file after doing > substitutions with confirm flag: %s/x/y/c > > > What steps will reproduce the problem? > > 1. Create this sample text file with 2 folds and start Vim as follows: > > $ cat bug.txt > // vim:fdm=marker > > // {{{1 > x > x > x > // {{{1 > x > x > x > $ vim -u NONE -N bug.txt > > > 2. Vim should open file and show 2 folds. enter Ex command: > > :%s/x/y/c > > and press y multiple times (6 times) to confirm each > substitution one by one. > > What is the expected output? What do you see instead? > > At the end of the 6 substitutions, observe that cursor > is at an incorrect location since it is located below > the end of the file (where Vim shows ~) > > I would expect cursor to be located on the last line > of the file. > > > What version of the product are you using? On what operating system? > > I'm using Vim-7.3.762 (in terminal or gvim gtk2) on Linux x86_64. > > > Please provide any additional information below. > > Screenshot below shows the cursor at the wrong location, > below the end of file, after pressing y 6 times to > confirm each substitution. > > http://dominique.pelle.free.fr/pic/vim-cursor-bug-after-subst.png Here is a patch: diff --git a/src/ex_cmds.c b/src/ex_cmds.c --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -5200,6 +5200,7 @@ EMSG2(_(e_patnotf2), get_search_pat()); } + changed_window_setting(); vim_free(regmatch.regprog); } regards, Christian -- Manche sind auf das, was sie wissen, stolz, gegen das, was sie nicht wissen, hoffärtig. -- Goethe, Maximen und Reflektionen, Nr. 712 -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
