Nicola wrote:
> To reproduce, use this vimrc_minimal:
>
> set nocompatible
> fun! MyFun()
>  silent !ls
> endf
> nmap <expr><leader>o MyFun()
>
> Then:
>
> vim -u vimrc_minimal
> :Ex
> :enew
> \o
>
> (:enew is optional). You should get the following error:
>
> Error detected while processing function <SNR>28_LocalBrowseRefresh:
> line   26:
> E523: Not allowed here:    tabn
> Press ENTER or type command to continue
> Error detected while processing function <SNR>28_LocalBrowseRefresh:
> line   63:
> E523: Not allowed here: 1wincmd w
>
> Note that \o does not give errors if used before :Ex.
>
> The workaround is to use:
>
> nmap <leader>o :<c-u>call MyFun()<cr>
>
> but of course a workaround should not be necessary.
Hello:

What I think is happening: MyFun() is returning an integer 0 after
having done a shell command.  Netrw invokes s:LocalBrowseRefresh()
whenever a shell command is invoked; it checks over all tabs and windows
for a netrw buffer that might have been affected.  However, in a
map-<expr>, tabs and windows really shouldn't be changed.

Please try v157a of netrw, which you can get from my website:
http://www.drchip.org/astronaut/vim/index.html#NETRW .

Regards,
Chip Campbell

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui