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

Lastlog searching with / #19

Open
shabble opened this issue Jan 20, 2012 · 1 comment
Open

Lastlog searching with / #19

shabble opened this issue Jan 20, 2012 · 1 comment

Comments

@shabble
Copy link
Owner

shabble commented Jan 20, 2012

Add support for searches with / and ?.

Search begins with /<pattern> or ?<pattern> from command mode.

Internally, runs a /lastlog <pattern> <$max_matches>, and consumes the result (not printed).

Parse timestamps or do other cunning matching things to find the position of each match in the scrollback.

Jump the window-item view back to the most recent match with /sb goto ...

Each subsequent / (or n) in command-mode moves to the next match in the buffer. ? moves in the opposite direction.

Any new pattern invalidates the current jump list.

TODO

  • Need a way to cancel and jump back to /sb end
  • Finding the actual position of the matches might be tricky (especially without timestamps, or non-standard formats)
    • Could compare entire lines by walking the window history, but that sounds slow.
  • Is it possible to highlight the matched pattern onscreen? Probably not easily, without remove/readding the line entry, or using gui_print (which is transient)
@shabble
Copy link
Owner Author

shabble commented Jan 20, 2012

  • :<num>gg for /sb goto +/-num might also be nice

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

No branches or pull requests

1 participant