Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider that qf#GetEntryPath might return an empty string #40

Open
LemonBoy opened this issue Feb 18, 2017 · 2 comments
Open

Consider that qf#GetEntryPath might return an empty string #40

LemonBoy opened this issue Feb 18, 2017 · 2 comments
Assignees
Labels

Comments

@LemonBoy
Copy link
Contributor

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

@romainl romainl self-assigned this Feb 19, 2017
@romainl romainl added the bug label Feb 19, 2017
@ntnn
Copy link
Collaborator

ntnn commented Feb 19, 2017

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
Copy link
Collaborator

ntnn commented Feb 19, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants