marijnh/CodeMirror — pull request #1244 by bfrohs (2013-02-13 18:44:09+00:00)
Title: Signal "change" event before clearing current op

Groups changes made by `on("change")` with the current operation so undo/redo treats it as a single change. This is especially useful when `on("change")` automatically fixes input (such as normalizing indentation).

I'm not sure if this breaks anything---the tests seem to pass and the modes I tried still worked. If this pull request can't be accepted, perhaps a "changeWithOp" event? Or a way to group the change in `on("change")` with the previous operation? (I couldn't find a way to do this, and don't remember this being a possibility.)