Function moras::modules::riscv::middleware::frontend_api::change_current_tab
source ยท pub fn change_current_tab(
cur_tab_name: State<'_, CurTabName>,
tab_map: State<'_, TabMap>,
newpath: &str,
) -> bool
Expand description
Changes the current tab to the one specified by the new path.
cur_name
: Current name of the tab in focus.newpath
: Path to the file associated with the new tab to focus.tab_map
: Current state of all open tabs.
Returns bool
indicating whether the operation was successful.
The only case where it would fail is if the tab with the specified
path does not exist in opened tabs.