(state: &mut EditorState)
| 155 | } |
| 156 | } |
| 157 | |
| 158 | pub fn undo_scene_doc(state: &mut EditorState) -> bool { |
| 159 | let Some(prev) = state.scene_undo_stack.pop() else { |
| 160 | state.log = "undo\nempty".to_string(); |
| 161 | return false; |
| 162 | }; |
| 163 | if !state.doc_text.is_empty() { |
| 164 | state.scene_redo_stack.push(state.doc_text.clone()); |
| 165 | } |
| 166 | state.doc_text = prev; |
| 167 | let _ = cached_scene_doc_shared(&state.doc_text); |
| 168 | state.dirty = true; |
| 169 | mark_active_scene_dirty(state); |
| 170 | state.log = format!("undo\n{} left", state.scene_undo_stack.len()); |
| 171 | true |
| 172 | } |
| 173 | |
| 174 | pub fn redo_scene_doc(state: &mut EditorState) -> bool { |
nothing calls this directly
no test coverage detected