vim-qf
vim-qf copied to clipboard
Consider that qf#GetEntryPath might return an empty string
s:JumpFileChunk should be aware of this and skip the line accordingly.
Mhm.
Two ways we could go about this:
-
Additional logic in
qf#GetEntryPathto waltz up the entries until it found a path. That would work but then we'll need error handling in the calling functions, in case e.g. the first few lines have now paths. -
Add additional logic in
qf#preview#PreviewFileUnderCursorands:JumpFileChunkto act accordingly.
Imho the first option would be more error prone, especially in the long run.
What do you think, @romainl?
Afterthought - the best thing would be a wrapper qf#GetEntryPathRecursive(o.s.) around qf#GetEntryPath, which does go until the first available and returns nil if none was found.