tomtom/quickfixsigns_vim

brakes vim ui on :make

noscript opened this issue · 6 comments

Happens every other time I run :make. Entire make output gets swallowed and also the statusline disappears. Screenshot attached without quickfixsigns_vim (left) and with:
make

What are the values of &compiler and &efm in both cases? Could you also be so nice and give me detailed instructions of how to reproduce example 1 & 2 -- including the source, command-line options, contents of a minimal vimrc etc. Thanks.

I thought your query was about checksyntax. Anyway, does the problem also occur with :lmake and when adding

    let g:quickfixsigns_class_qfl = {'sign': '*s:QflSign', 'get': 's:GetQFList(%s)', 'event': ['BufEnter', 'CursorHold', 'CursorHoldI'], 'level': 7, 'scope': 'vim'}

to vimrc (i.e. don't invoke qfs on QuickFixCmdPost events).

Still producible. Settings g:quickfixsigns_class_qfl and using :lmake didn't help.

I don't have compiler set

:echo &compiler
E113: Unknown option: compiler
E15: Invalid expression: &compiler

efm is identical in both cases.

:echo &efm
%*[^"]"%f"%*\D%l: %m,"%f"%*\D%l: %m,%-G%f:%l: (Each undeclared identifier is reported only once,%-G%f:%l: for each function it appears in.),%-GIn file included from %f:%l:%c:,%-GIn file included from %f:%l:%c\,,%-GIn file included from %f:%l:%c,%-GIn file included from %f:%l,%-G%*[ ]from %f:%l:%c,%-G%*[ ]from %f:%l:,%-G%*[ ]from %f:%l\,,%-G%*[ ]from %f:%l,%f:%l:%c:%m,%f(%l):%m,%f:%l:%m,"%f"\, line %l%*\D%c%*[^ ] %m,%D%*\a[%*\d]: Entering directory `%f',%X%*\a[%*\d]: Leaving directory `%f',%D%*\a: Entering directory `%f',%X%*\a: Leaving directory `%f',%DMaking %*\a in %f,%f|%l| %m

Sample files:

  • main.c
int main()
{
    //int a = 0;
    return a;
}
  • Makefile
out: main.c
    gcc -o $@ $<
  • vimrc
set nocompatible
syntax on
filetype plugin indent on

To reproduce:

  1. :e main.c
  2. :make
  3. status line and part of make output is gone, press enter, status bar comes back
  4. uncomment //int a = 0; and :w
  5. :make
  6. same as in 3)
  7. comment int a = 0;, :w and goto 2)

Thanks for the detailed instructions. I think this is probably what's
going on: :make triggers the QuickFixCmdPost event. This causes QFS to
update the signs. Setting a sign seemingly makes VIM update the display
and this probably causes the output of make vanish.

In order to not have the output of :make disappear, I think you have the
following options:

  1. Wrap the make command, capture its output and display it later, e.g.:

    command! MyMake redir => s:make_out | silent! make | redir END |
    echo s:make_out

  2. Remove QuickFixCmdPost from the g:quickfixsigns_class_qfl.event list
    (either by setting the variable in vimrc or by removing the item in
    ~/.vim/after/plugin/quickfixsigns.vim). With this option, the signs are
    updated with a small delay (:h updatetime) on the next CursorHold event.
    This also affects other commands that trigger QuickFixCmdPost
    autocommands, which is why I don't want to make this the default behaviour.

HTH

  1. + 2. solution kind of works, but after a small delay I get this error that appears over and over again:
Error detected while processing function QuickfixsignsSet..<SNR>12_UpdateLineNumbers..Quickfixs
ignsListBufferSigns..<SNR>12_Redir:
line    4:
E121: Undefined variable: rv
Press ENTER or type command to continue

I was testing against 7437819.

|12_Redir: line 4: E121: Undefined variable: rv Press ENTER or
type command to continue |
Which version of vim is it you use? Was it 7.3? I got similar
:redir-related errors sometimes with earlier versions of vim.