Open tlamr opened 3 years ago
I guess? It needs a bit of refactoring, because you have to coalesce the context lines for multiple consecutive matches.
I think you are asking if context lines are supported out of the box. The answer is: no.
Thanks @hanwen ! I believe that this would be a brilliant feature, I so far never worked with go, but I'll try to look into it.
Cheers, T
So this change https://github.com/tlamr/zoekt/commit/65f2bb4fbc90faea9f32c0fc189bbf7bcff967be produces https://ibb.co/Ky2PtSZ which might be just good enough for us.
Would you @hanwen be willing to accept a patch that adds this as a parameter or would you prefer some more polished solution?
Thanks, Tomas
no. This breaks the API contract: the segment you're returning contains a '\n'. I think it would also do the wrong thing if you have two matches on consecutive lines: you'd get some lines returned twice.
ok, thanks!
Cheers, Tomas
Hi guys,
is it possible to show search term context in browser? e.g. 3 lines before and 3 lines after match. Thanks a lot!