fn apply_undo( editor_state: &Arc<Mutex<EditorState>>, command_history: &Arc<Mutex<CommandHistory>>, )