vim-qf icon indicating copy to clipboard operation
vim-qf copied to clipboard

Consider that qf#GetEntryPath might return an empty string

Open LemonBoy opened this issue 8 years ago • 2 comments

s:JumpFileChunk should be aware of this and skip the line accordingly.

LemonBoy avatar Feb 18 '17 12:02 LemonBoy

Mhm.

Two ways we could go about this:

  1. Additional logic in qf#GetEntryPath to 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.

  2. Add additional logic in qf#preview#PreviewFileUnderCursor and s:JumpFileChunk to act accordingly.

Imho the first option would be more error prone, especially in the long run.

What do you think, @romainl?

ntnn avatar Feb 19 '17 11:02 ntnn

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.

ntnn avatar Feb 19 '17 12:02 ntnn