Yegappan wrote:
> On Wed, Dec 4, 2019 at 7:27 AM Christian Brabandt <[email protected]> wrote: > > > > > > On Mi, 04 Dez 2019, Bram Moolenaar wrote: > > > > > > > > Yegappan wrote: > > > > > > > On Tue, Dec 3, 2019 at 10:16 AM Yegappan Lakshmanan > > > > <[email protected]> wrote: > > > > > > > > > > Hi all, > > > > > > > > > > While debugging a failure in Appveyor with PR 5307, I found > > > > > the following. The existing test Test_window_cmd_cmdwin_with_vsp() > > > > > is interfering with the new Test_yank_block() test. I can reproduce > > > > > the problem using the following simple function: > > > > > > > > > > func Test_window_cmd_cmdwin_with_vsp() > > > > > call feedkeys("q:\<CR>") > > > > > new | only! > > > > > call feedkeys('', 'x') > > > > > endfunc > > > > > > > > > > If I invoke the above function in MS-Windows GUI Vim, I see the > > > > > following error: > > > > > > > > > > :<t_ýT> > > > > > Error detected while processing function > > > > > Test_window_cmd_cmdwin_with_vsp: > > > > > line 3: > > > > > E488: Trailing characters > > > > > > > > > > I couldn't figure out why the special character is getting inserted > > > > > into the command line. Any suggestions? > > > > > > > > > > > > > I have minimized the steps that triggers this issue to: > > > > > > > > :call feedkeys(":q\<CR>", "x") > > > > > > > > Just executing the above command triggers the error. > > > > > > I think you mean ":q\<CR>". > > > > > > The "q:" sequence is translated to ":" and K_CMDWIN. in > > > getcmdline_int() there is this code: > > > > > > if (c == cedit_key || c == K_CMDWIN) > > > { > > > if (ex_normal_busy == 0 && got_int == FALSE) > > > { > > > /* > > > * Open a window to edit the command line (and history). > > > */ > > > c = open_cmdwin(); > > > some_key_typed = TRUE; > > > } > > > } > > > > > > Since ex_normal_busy is set it won't open the cmdline window, but insert > > > the key in the command line. The following CR then executes it. > > > > > > Now I wonder why ex_normal_busy is checked here. Inserting K_CMDWIN > > > doesn't make sense. We can at least make it: > > > > According to git blame, this comes from patch 7.4.441 > > https://github.com/vim/vim/commit/58da707d2412f60eb5c0e158ade48dd8a13c96ed > > > > Problem: Endless loop and other problems when 'cedit' is set to CTRL-C. > > Solution: Do not call ex_window() when ex_normal_busy or got_int was set. > > (Yasuhiro Matsumoto) > > > > I am not able to reproduce the problems reported by Yasuhiro Matsumoto > using Vim 8.1.2385. I think my careful change is correct. Also removing the check for cedit would re-introduce the problem. > The e-mail thread for 7.4.441 is below: > > > > > * CASE1: > > > > Note: vim will hang. And it require kill -9. > > > > :set cedit=<c-c> > > :normal! : > > > > => endless loop > > > > * CASE2: > > > > :set cedit=<C-c> > > :echo input('') > > > > Type <c-c> > > > > => broken cmdwin are displayed > > > > Even though these problems are not seen now, it will be good to add tests > for these. Always good to test what was fixed! -- hundred-and-one symptoms of being an internet addict: 182. You may not know what is happening in the world, but you know every bit of net-gossip there is. /// Bram Moolenaar -- [email protected] -- 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 /// -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/201912041809.xB4I9SDN032563%40masaka.moolenaar.net.
