-
Notifications
You must be signed in to change notification settings - Fork 12
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
[Request] Filter entries by given range? #57
Comments
Hi, that's an interesting one. In principle this plugin just uses the builtin undo states which does not support any kind of querying based on content. However, we precalculate all diffs while visiting the undo states and building the tree, so we could tell which lines are affected with a minimum of fancy code necessary 🤔 What do you think about the following:
Otherwise, this might be very doable and useful, yeah 👍🏻 |
Ah okay, I personally wouldnt mind it because like you said theres always the option to yank the changes 👍🏻. Also maybe any change can create a new undo state on-top of the tree? Not sure if that's possible. |
I had a play and this seems to work in my very brief testing but thought you might want to use it as a base? |
Could we add an option to filter the picker entries by a given range?
For example we could bind in visual selection to take the start and end lines, and pass that into telescope-undo, then filter entries if they don't have a diff between the given lines? I used this a lot in IntelliJ and it would be useful to have here. It probably doesnt have to be smart and try and resolve where code has moved about between diffs, could probably just check the diff lies between the given line numbers
Maybe something like this before passing it into telescope:
https://www.jetbrains.com/help/idea/local-history.html
The text was updated successfully, but these errors were encountered: