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) Best, Christian -- "Ich kann das Predigen nicht vertragen; ich glaube, ich habe in meiner Jugend mich daran übergessen." -- Goethe, Maximen und Reflektionen, Nr. 202 -- -- 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/20191204152752.GI28132%40256bit.org.
