Function moras::modules::riscv::middleware::frontend_api::close_tab

source ยท
pub fn close_tab(
    window: Window,
    cur_tab_name: State<'_, CurTabName>,
    tab_map: State<'_, TabMap>,
    filepath: &str,
) -> Optional
Expand description

Closes the tab associated with the given file path.

  • window: Window handle.
  • cur_name: Current name of the tab in focus.
  • tab_map: Current state of all open tabs.
  • filepath: Path to the file associated with the tab to close.

Returns Optional indicating the success or failure of tab close if success, return the new tab to focus on, else return error message.