Scott Prager wrote:

> A user recently asked Neovim project to change ":find" to work
> breadth-first as opposed to depth-first, claiming it would find
> "wrong/a/b/c/foo" before it found "goal/foo". (
> https://github.com/neovim/neovim/issues/1035)
> 
> Included is two patches. The first enabling BFS through a new option,
> 'breadthfirst'. The second updating the identifiers and documentation to
> not assume the underlying data structure is a stack.
> 
> One concern I didn't know to address is this comment:
> 
> misc2.c +4819
>  * The search algorithm is depth first. To change this replace the
>  * stack with a list (don't forget to leave partly searched directories on
> the
>  * top of the list).
> 
> Seems to me like this code is well factored enough that just changing
> ff_push() and _pop() would be sufficient, but I'm not 100% on that.

Thanks.

I wonder, is an option the right way to change behavior?  These search
functions are used in several places, changing them all at the same time
is not giving the user much control.  E.g. one might not what to change
tags file search.

It would be good to have more tests for this.  The find-file stuff has
had several bugs in the past.

-- 
hundred-and-one symptoms of being an internet addict:
6. You refuse to go to a vacation spot with no electricity and no phone lines.

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

--- 
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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui