Skip preview for non-existing buffer (bufnr == 0).
The vim docs say:
getqflist()
Quickfix list entries with a non-existing buffer
number are returned with "bufnr" set to zero (Note: some
functions accept buffer number zero for the alternate buffer,
you may need to explicitly check for zero).
This causes trouble for the "Trouble" file section:
To fix, we simply do:
function View:_preview()
...
if item.bufnr == 0 then
return
end
util.debug("preview")
...
end
Continuation of 46b60e9.
Skip preview for non-existing buffer (
bufnr == 0
).The vim docs say:
This causes trouble for the "
Trouble
" file section:To fix, we simply do: