itod / pegkit

'Parsing Expression Grammar' toolkit for Cocoa/Objective-C
MIT License
392 stars 37 forks source link

Save deletes undo history in ParseGenApp #52

Open yepher opened 7 years ago

yepher commented 7 years ago

BUG

When clicking File->Saveor Generate in ParseGenApp the undo history is lost.

This makes it hard to quickly test a new grammar entry and then rollback to pre-edit condition.

The app should maintain undo history while it is running in the same document.

Some research notes on issue

yepher commented 7 years ago

Looking through the code there are defensive copies of NSString which does not make sense to me since NSString is immutable anyway.

I am not exactly clear why there is KVO for grammar<->NSTextView.