             @_set_syncstring_to_codemirror()
         value = @_syncstring.undo().to_str()
         cm.setValueNoJump(value, true)
-        @save_state_debounce?()
+        @save_state_throttle?()
         @_last_change_time = new Date()
 
     # per-session sync-aware redo

                    redux.getProjectActions(@editor.project_id).close_tab(@filename)

                save_state = () => @_sync()
                # We debounce instead of throttle, because we want a single "diff/commit" to correspond
                # a burst of activity, not a bunch of little pieces of that burst.  This is more
                # consistent with how undo stacks work.
                @save_state_debounce = underscore.debounce(save_state, @opts.sync_interval)

                @codemirror.on 'change', (instance, changeObj) =>
                    if @_closed
                        return
                    #console.log("change event when live='#{@live().string()}'")
                    if changeObj.origin?
                        if changeObj.origin == 'undo'
                            @on_undo?(instance, changeObj)

        @element     = @editor.element

        # window.w = @

        # replace undo/redo by sync-aware versions
        for cm in [@codemirror, @codemirror1]
            cm.undo = @undo
