Hirohito Higashi wrote:

> > > 2015-12-29(Tue) 3:21:01 UTC+9 Bram Moolenaar:
> > > > Patch 7.4.984
> > > > Problem:    searchpos() always starts searching in the first column, 
> > > > which is
> > > >             not what some people expect. (Brett Stahlman)
> > > > Solution:   Add the 'z' flag: start at the specified column.
> > > > Files:      src/vim.h, src/eval.c, src/search.c,
> > > >             src/testdir/test_searchpos.vim, src/testdir/test_alot.vim,
> > > >             runtime/doc/eval.txt
> > 
> > [...]
> > 
> > > I found a typo in src/testdir/test_searchpos.vim.
> > > Please check and fix this.
> > > Patch is attached.
> > 
> > Thanks.  Why doesn't this cause an error?  I think we should verify
> > cursor() has two arguments.
> 
> cursor() has two of usage.
>   doc> cursor({lnum}, {col} [, {off}])
>   doc> cursor({list})
> 
> Check whether the list type, when single argument.
> How about attached patch?

Thanks.  I think we can just use the existing condition that list2fpos()
fails.  I don't see a reason why a wrong list argument would not cause
an error.

I'll also write a test for cursor().


-- 
OLD WOMAN: Well, how did you become king, then?
ARTHUR: The Lady of the Lake, her arm clad in the purest shimmering samite,
        held Excalibur aloft from the bosom of the water to signify by Divine
        Providence ...  that I, Arthur, was to carry Excalibur ...  That is
        why I am your king!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

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