On 09:24 Thu 04 Oct     , Marcin Szamotulski wrote:
> > 
> > Thanks.  Thus this fixes the reported problem without side effects?
> 
> I have tested it and it works fine in general. I only found a strange
> behaviour in one case. I have a script which defines a cmap to <CR> and
> calls a function via <C-\>e. When the function name is XX() everything
> works fine, when the function name is WrapCmdLine() after pressing enter
> in the expression register command line is not redraw, though it has
> changes, since when I press <space><bs> it gets redrawn with the value
> of the expression in the right place. You can test it with the attached
> script. The function XX()=WrapCmdLine() only modifies the behaviour of
> the cmdline when the cmdline starts with "! " sending the command line
> to system() function rather than to the terminal directly.
> 
> I was testing with:
> ./vim -u NONE -i NONE --noplugin
> 
> Best regards,
> Marcin Szamotulski

I found that the problem was caused by a <silent> keyword in a cmap:

fun! X()
    return getcmdline()
endfun

" This map will not redraw the command line:
cnoremap <silent> <CR> <C-\>eX()<CR><CR>

" This map will redraw the command line:
cnoremap <CR> <C-\>eX()<CR><CR>

And actually all cmaps behave like that. Maybe we should add
:cmap-<silent> just after ":help :map-<silent>" in the help file. If so
I can write a patch for the documentation.

Best regards,
Marcin Szamotulski

-- 
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

Raspunde prin e-mail lui