Q: how can I prevent undos of invisible text?

I use org-mode and outline-minor-mode in virtually every buffer, and leave text folded (invisible) unless I'm explicitly working on it. Sometimes I hide text and then accidentally hit undo, which is super confusing.

How can I prevent undo from undoing edits that are in an invisible part of the buffer?

  • It might be worthwhile to play with the built-in ability to undo/redo in region, and create a region that excludes the hidden text. – lawlist Sep 26 '17 at 17:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.