Hi Bram,
On Wed, Dec 4, 2019 at 6:11 AM Bram Moolenaar <[email protected]> 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>".
>
Yes. I meant to type "q:" to open the cmd window.
>
> 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.
>
It looks like the feedkeys("q:", "xt") call doesn't open the cmd window.
How does one open the cmd window from a script then?
>
> Now I wonder why ex_normal_busy is checked here. Inserting K_CMDWIN
> doesn't make sense. We can at least make it:
>
> if ((c == K_CMDWIN || ex_normal_busy == 0) && got_int == FALSE)
>
> Just staying on the safe side, perhaps checking ex_normal_busy can be
> removed, but I don't recall why it was added.
>
Based on Christian's reply, it looks like this change might reintroduce the
bug fixed by 7.4.441.
Regards,
Yegappan
--
--
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/CAAW7x7k%2BcKcjKz0k3cEei9Eous4waJvxTNhPLV%2BrtsYwDcQJfw%40mail.gmail.com.