On Sat, 22 Dec 2007 13:49:51 +0100
Bram Moolenaar <[EMAIL PROTECTED]> wrote:

> 
> 
> Shotaro Aoyama wrote:
> 
> > Using :noh in a user-defined function has no effect.
> > Is this a bug or intended?
> > 
> > To reproduce:
> > 
> > $ vim -u NONE -N
> > 
> > function! Noh()
> >   noh
> > endfunction
> > set hlsearch
> > 
> > " search /foo
> > 
> > :call Noh()
> > 
> > " Now, the hilight doesn't turn off.
> 
> After a function returns the search patterns are restored.  That also
> includes the status for highlighting their matches.  I can't think of
> another solution right now, you will have to find a way to keep
> ":nohlseach" outside of the function.

ok.

As Tony says, it seems that the helpfile refers 
*autocmd-seachpat* but not about inside a function.
Thanks.

-- 
AOYAMA Shotaro <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui