Skip to main content

clear_dangling_focus_magnify

Function clear_dangling_focus_magnify 

Source
fn clear_dangling_focus_magnify(
    tab: &mut TabRecord,
    pre_focused: &str,
    pre_magnified: &str,
) -> (bool, bool)
Expand description

Clear the tab’s focus/magnify ids when they no longer resolve to a node in its (already-edited) tree, given their values from BEFORE the edit. Returns (was_focused, was_magnified): whether each one was cleared. Shared by every edit that can remove a leaf — a node delete, and a pane tab move that empties its source pane — see handle_layout_delete_node for the two ways an id can dangle after a delete.