Yasuhiro Matsumoto wrote:

> Try following on windows.
> 
> ---- script1 ----
> function! DoSpace()
>   return ' '
> endfunction
> cnoremap <expr> <space> DoSpace()
> ----
> 
> ---- script2 ----
> function! DoSpace()
>   redir => foo
>   silent! command
>   redir END
>   return ' '
> endfunction
> cnoremap <expr> <space> DoSpace()
> ----
> 
> When run script1 and type ":XXX " in normal mode, you'll see ":XXX ".
> But if run script2 and type it, it show " XXX ". You can see ":" is erased 
> in command line.
> 
> The cause is:
> Doing redir and something that updating cursor position in scripts are 
> change msg_col even if command use silent!. This is not a problem. But if 
> enter "redir END" for <expr> function, msg_col should be restored to 
> original position that is started with ":redir foo".
> 
> Below is a patch. Please check this.

I am unable to reproduce the problem.  What settings would be needed?
Is this in a terminal or in gvim?

-- 
hundred-and-one symptoms of being an internet addict:
29. Your phone bill comes to your doorstep in a box.

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

Raspunde prin e-mail lui