(state: &mut EditorState)
| 171 | } |
| 172 | |
| 173 | pub fn undo_scene_doc(state: &mut EditorState) -> bool { |
| 174 | let Some(prev) = state.scene_undo_stack.pop() else { |
| 175 | state.log = "undo\nempty".to_string(); |
| 176 | return false; |
| 177 | }; |
| 178 | if !state.doc_text.is_empty() { |
| 179 | state.scene_redo_stack.push(state.doc_text.clone()); |
| 180 | } |
| 181 | state.doc_text = prev; |
| 182 | let _ = cached_scene_doc_shared(&state.doc_text); |
| 183 | state.dirty = true; |
| 184 | mark_active_scene_dirty(state); |
| 185 | state.log = format!("undo\n{} left", state.scene_undo_stack.len()); |
| 186 | true |
| 187 | } |
| 188 |
nothing calls this directly
no test coverage detected