Skip to content
This repository was archived by the owner on Apr 6, 2018. It is now read-only.

Conversation

@jacekkopecky
Copy link
Contributor

Due to atom/text-buffer#81 and 30e4073, backspace in replace mode hasn't been working well.

For example, ctrl-r x to paste the x register would have backspace first undo the insert, then the delete, which looks wrong. Another example: when replacing after the end of the line, the grouping of multiple typed characters for undo confused our replace-mode backspace to no end.

@maxbrunsfeld
Copy link
Contributor

Still thinking about this one. I think your solution with the transaction grouping interval is good, but I'd like to avoid adding more direct interrogation of the text-buffer's undoStack if at all possible, because that code is private, so its implementation is subject to change. Maybe what this is telling us is that we need a new public method on TextBuffer, like ::hasChangesSinceCheckpoint(checkpoint) (or maybe just ::getChangesSinceCheckpoint(checkpoint)). What do you think about that?

@jacekkopecky
Copy link
Contributor Author

Yes, I was thinking that hasChangesSinceCheckpoint(checkpoint) could be on TextBuffer, but I haven't dared propose PRs on core just yet.

getChangesSinceCheckpoint(checkpoint) would be even more useful – then we might proceed (maybe with Patch) to extract the last added character and undo only that somehow. Plus it might be useful further on, for handling undo and redo of insert operations.

Would you be willing to merge this one until TextBuffer can provide anything like the above? The current behaviour of backspace in replace mode, without this PR, is too buggy.

@lee-dohm
Copy link
Contributor

lee-dohm commented Apr 5, 2018

As stated in the README, this package is no longer maintained and is deprecated. We recommend that people use the vim-mode-plus package instead. Because of this, we are archiving this repository and closing all issues and pull requests. Thanks very much for your support and contributions!

@lee-dohm lee-dohm closed this Apr 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants