fix #282: Pressing Ctrl+Z in InsertWithCursor mode causes InvalidOperationException