Yegappan wrote:

> On Fri, May 3, 2019 at 12:56 PM Bram Moolenaar <[email protected]> wrote:
> >
> > Patch 8.1.1256
> > Problem:    Cannot navigate through errors relative to the cursor.
> > Solution:   Add :cabove, :cbelow, :labove and :lbelow. (Yegappan Lakshmanan,
> >             closes #4316)
> > Files:      runtime/doc/index.txt, runtime/doc/quickfix.txt, 
> > src/ex_cmdidxs.h,
> >             src/ex_cmds.h, src/ex_docmd.c, src/proto/quickfix.pro,
> >             src/quickfix.c, src/testdir/test_quickfix.vim
> >
> 
> This patch uses ADDR_OTHER for the new Ex commands. With this, when a
> negative count is passed to the command, it is subtracted from the current
> line number and passed to the command. The command will then jump to
> that quickfix entry. I think the command should display an error in this case.

Yeah, I noticed some commands were using RANGE with ADDR_NONE, that
doesn't work.  ADDR_OTHER is better, but it defaults to using the line
number (like that works in the quickfix window to select an quickfix
entry, which is a weird combination).

Perhaps we should introduce another ADDR_ value for just using a default
value of zero and not using the line number.  If we want to disallow a
negative number at the same time we could use ADDR_POSITIVE.  Zero would
then also be wrong.  Hmm, it turns out ":0cnext" is currently OK, so we
should accept zero.  But ":-1cnext" is clearly wrong.  So we could call
it ADDR_UNSIGNED.

We should also use this for commands like ":cnext".  Currently these
also take a count, thus ":2cnext" and ":cnext 2" work.  We should make
:cabove and friends do the same.

I'll make this work.  I'm slightly worried that some people were using
".cnext", "$cnext" or similar commands, which will now fail.

-- 
Compilation process failed successfully.

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