Function moras::modules::riscv::middleware::frontend_api::modify_current_tab

source ยท
pub fn modify_current_tab(
    window: Window,
    cur_tab_name: State<'_, CurTabName>,
    tab_map: State<'_, TabMap>,
    rpc_state: State<'_, RpcState>,
    op: FileOperation,
    start: CursorPosition,
    end: CursorPosition,
    content: &str,
) -> Optional
Expand description

Updates the content of the tab associated with the given file path.

  • window: Window handle.
  • cur_tab_name: State containing the current tab name.
  • tab_map: Current state of all open tabs.
  • rpc_state: State containing the RPC server/client.
  • op: File operation to be performed.
  • start: Starting position of the content to be updated.
  • end: Ending position of the content to be updated.
  • content: New content to be inserted.

Will emit event: front_update_content

Returns Optional indicating the success or failure of the update.