Skip to content

provide configurable context for search hits #1767

Open
@senthilkumarsh

Description

@senthilkumarsh
No description provided.

Activity

vladak

vladak commented on Sep 13, 2017

@vladak
Member

can you add more details please ?

vladak

vladak commented on Sep 18, 2017

@vladak
Member

Marking this as enhancement. However, this needs better specification to see what needs to be done. Or a pull request.

senthilkumarsh

senthilkumarsh commented on Sep 18, 2017

@senthilkumarsh
Author

When we search for a content, we are showing only the matching line of content with line number. I need a customization option to include n lines before and after the actual line in the search result screen.

vladak

vladak commented on Oct 2, 2017

@vladak
Member

All right. This is something which probably needs to be done in Summarizer code.

changed the title [-]Include before and after content from file search[/-] [+]provide configurable context for search hits[/+] on Oct 2, 2017
idodeclare

idodeclare commented on Mar 22, 2020

@idodeclare
Contributor

I have little design sense, but I'm thinking something like the following:

image

When you do a 0-context search, results would appear as they do now:

image

But if you specify to show some extra context, we make sure to clarify the non-contiguous sections. (We don't do that for 0-context search, but it's not a problem when every line has a highlight.)

image

I think up to 3 lines of surrounding context is a good maximum, because we still have to enforce the contextLimit:

image

But then the "more" view has the unlimited context:

image

This is all real BTW. Seeing if #2732 ever gets merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @idodeclare@vladak@senthilkumarsh

      Issue actions

        provide configurable context for search hits · Issue #1767 · oracle/opengrok