def METHOD_NAME(self, event):
    if self._current_code_view is None:
        return
    if not hasattr(self._current_code_view, "_update_already_scheduled"):
        self._current_code_view._update_already_scheduled = False
    if self._current_code_view._update_already_scheduled:
        return
    if self._last_op_delta() < 0.3:
        self._current_code_view._update_already_scheduled = True
        def delay_update():
            if self._last_op_delta() < 0.3:
                # still typing
                self._current_code_view.text.after(100, delay_update)
                return
            self._current_code_view._update_already_scheduled = False
            self._update(None)
        self._current_code_view.text.after_idle(delay_update)
    else:
        self._update(event)