Skip to main content

copy_mode_indicator

Function copy_mode_indicator 

Source
pub fn copy_mode_indicator(
    state: &CopyModeState,
    search_active: bool,
) -> Vec<RenderItem>
Expand description

Generate mode indicator render items for status bar integration

Creates a styled indicator showing the current copy mode state. Returns an empty vector if copy mode is not active.

§Arguments

  • state - The current copy mode state
  • search_active - Whether search is currently active

§Returns

Vector of RenderItem elements for the status bar

§Example

use scarab_plugin_api::copy_mode::{CopyModeState, copy_mode_indicator};

let mut state = CopyModeState::new();
state.active = true;
let items = copy_mode_indicator(&state, false);
// Returns: [Background(orange), Foreground(dark), Bold, Text(" COPY "), ResetAttributes]