jmacdonald / amp

A complete text editor for your terminal.
https://amp.rs
Other
3.67k stars 105 forks source link

group justify command as a single operation #248

Closed oldaccountdeadname closed 2 years ago

oldaccountdeadname commented 2 years ago

Hey, sorry for the many PRs I've opened. this is just something I noticed and fixed in my build; figured I should submit it upstream! thanks!


commit message:

Prior to this commit, Amp would treat justification as two seperate
operations, leading to unexpected undo-redo behavior: Amp would first
get rid of the all the text and then replace it with the original
version upon two undos. The expected behavior is to treat the
justification as atomic, and Scribe's provided start/end_operation_group
methods are used to achieve that.
jmacdonald commented 2 years ago

No sweat, thanks for the fix @lincolnauster!