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

Fix earlier/later missing changeset update #1069

Merged
merged 1 commit into from
Nov 11, 2021

Conversation

pickfire
Copy link
Contributor

Fix #1059

cc @CptPotato

}
if success {
// reset changeset to fix len
self.changes = ChangeSet::new(self.text());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@CptPotato
Copy link
Contributor

I'm not able to reproduce the panic with this fix anymore, thanks 👍

On a side note, I think I misunderstood :earlier and :later. I initially thought they would be identical to undo and redo but they actually work differently. Is this the intended behaviour?

@archseer
Copy link
Member

@CptPotato I personally don't use these (though I should try to), but they hook into the undo tree so you're able to go to a version of the document at a specific time (could be on a different undo branch): https://vimtricks.com/p/vimtrick-time-travel-in-vim/

/// Revisions are commited with a timestamp. :earlier and :later can be used
/// to jump to the closest revision to a moment in time relative to the timestamp
/// of the current revision plus (:later) or minus (:earlier) the duration
/// given to the command. If a single integer is given, the editor will instead
/// jump the given number of revisions in the vector.

@archseer archseer merged commit 9d59142 into helix-editor:master Nov 11, 2021
@CptPotato
Copy link
Contributor

@CptPotato I personally don't use these (though I should try to), but they hook into the undo tree so you're able to go to a version of the document at a specific time (could be on a different undo branch): https://vimtricks.com/p/vimtrick-time-travel-in-vim/

That's really cool, thank you for elaborating.

@pickfire pickfire deleted the undo-redo-panic branch November 12, 2021 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Undo redo panic
3 participants