> >  When you are jumping around with ":cnext" you don't usually want to
> >  get the hit-enter prompt, you might not even look at the message
> 
> Yes, I agree. But the current behavior is inconsistent. When there are
> two errors on the _same_ line and you execute `:cnext` to jump to the
> first error of that line, there's no hit-enter prompt. But when you
> execute `:cnext` again to jump to the next error on the same line, the
> whole message of the second error is printed, and that can be
> annoying. 
> 
> It looks like Vim checks the current cursor position and if it's on
> the same line as the next error, the whole message is printed.

Yes.  It's a compromise.  The idea is that when the error is in the same
line you are at least not jumping to another file or scrolling the text.
But the prompt can still be annoying.

> >  Perhaps we should not show the whole message when using :cnext,
> >  only when using :cc?
> 
> The whole message is printed after `:cc` only if the cursor is on the
> same line as the current error. For example, when you source the above
> script and you move the cursor to the bottom and run `:cc`, Vim will
> jump to (1, 1) and print the truncated message. But when you leave the
> cursor _anywhere_ on the first line and run `:cc`, the whole message
> is printed. For me that's an inconsistency.

That is intentional.  If :cc has to jump, possibly to another file, you
probably don't want to see the whole message.  If you already are on the
right line, there is no point to use :cc for jumping.  So it shows
the whole message.  It's the simplest way to show the whole message
(without adding another command or temporarily changing an option).

> I do use `:cnext` and `:cprevious` a lot, but often there are multiple
> errors/warnings on the same line. When I jump to the first one,
> there's no hit-enter prompt but when I go to the next ones I get the
> entire message printed which pops up the hit-enter prompt.

That's why I suggested that maybe :cnext should not show the whole
message, even when already in the right line.  You might not know the
next error is in the same line.

-- 
In his lifetime van Gogh painted 486 oil paintings. Oddly enough, 8975
of them are to be found in the United States.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/202107292025.16TKPwZr2237737%40masaka.moolenaar.net.

Raspunde prin e-mail lui