odeke-em / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Populating the quickfix list sometimes hides previous messages #256

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minimal reproduction:

1. vim -N -u NONE -U NONE -i NONE
2. :file foo
3. Insert lines "foo", "bar", "baz".
(cursor is now on line 3)
4. :echomsg('hello')|cexpr('foo:2:1:message')
(cursor is now on line 2)
5. :echomsg('hello')|cexpr('foo:2:1:message')

What is the expected output? What do you see instead?

#4 and #5 produce different results:

- if the cursor needs to move line (#4), cexpr() [or setqflist(), etc] 
suppresses the message produced by echomsg(), displaying only "(1 of 1): 
message" in the status line and moving the cursor to the first quickfix 
location.
- if the cursor is already on the correct line (#5), regardless of whether it's 
on the correct column, then both the echomsg message and quickfix message are 
displayed in the status line, followed by a "Press ENTER" message (after which 
the cursor jumps to the right location).

If instead, the quickfix window is open, then everything is consistent: the 
echomsg message appears in the status line, the quickfix list is populated 
correctly, and the cursor jumps to the first quickfix location.

This only happens in nocompatible mode; in vi-compatible mode, the echomsg 
message always appears (and you always need to press enter).

I'm not sure which of #4 and #5 should be correct, but the inconsistency seems 
like a bug.

What version of the product are you using? On what operating system?
vim 7.4.430 on Ubuntu 12.04.2; this seems to occur in at least 7.0.1-7.4.443.

Original issue reported on code.google.com by malco...@google.com on 12 Sep 2014 at 10:59

GoogleCodeExporter commented 9 years ago
This intended.  When jumping to the line with the error a short message is 
displayed, to avoid scrolling and the hit-Enter prompt.  When already on the 
line the full message is displayed, possibly requiring to press Enter.

Original comment by brammool...@gmail.com on 12 Sep 2014 at 3:15