pub struct ZoneTracker { /* private fields */ }Expand description
Zone tracking state for managing semantic zones
This is not directly serialized for IPC, but used internally by the daemon to track zones and generate SemanticZone messages for the client.
Implementations§
Source§impl ZoneTracker
impl ZoneTracker
Sourcepub fn mark_prompt_start(&mut self, line: u32, timestamp: u64)
pub fn mark_prompt_start(&mut self, line: u32, timestamp: u64)
Handle OSC 133;A - Prompt start
Sourcepub fn mark_command_start(&mut self, line: u32, timestamp: u64)
pub fn mark_command_start(&mut self, line: u32, timestamp: u64)
Handle OSC 133;B - Command/input start
Sourcepub fn mark_command_executed(&mut self, line: u32, timestamp: u64)
pub fn mark_command_executed(&mut self, line: u32, timestamp: u64)
Handle OSC 133;C - Command executed, output begins
Sourcepub fn mark_command_finished(
&mut self,
line: u32,
exit_code: i32,
timestamp: u64,
)
pub fn mark_command_finished( &mut self, line: u32, exit_code: i32, timestamp: u64, )
Handle OSC 133;D - Command finished
Sourcepub fn set_command_text(&mut self, command: String)
pub fn set_command_text(&mut self, command: String)
Set command text for the most recent input zone
Sourcepub fn zones(&self) -> &[SemanticZone]
pub fn zones(&self) -> &[SemanticZone]
Get all tracked zones
Sourcepub fn command_blocks(&self) -> &[CommandBlock]
pub fn command_blocks(&self) -> &[CommandBlock]
Get all completed command blocks
Sourcepub fn current_block(&self) -> Option<&CommandBlock>
pub fn current_block(&self) -> Option<&CommandBlock>
Get the current incomplete command block
Sourcepub fn find_block_at_line(&self, line: u32) -> Option<&CommandBlock>
pub fn find_block_at_line(&self, line: u32) -> Option<&CommandBlock>
Find the command block containing the given line
Sourcepub fn find_zone_at_line(&self, line: u32) -> Option<&SemanticZone>
pub fn find_zone_at_line(&self, line: u32) -> Option<&SemanticZone>
Find the zone containing the given line
Sourcepub fn last_output_zone(&self) -> Option<&SemanticZone>
pub fn last_output_zone(&self) -> Option<&SemanticZone>
Get the last output zone for “copy last output” functionality
Sourcepub fn adjust_for_scroll(&mut self, lines_scrolled: i32)
pub fn adjust_for_scroll(&mut self, lines_scrolled: i32)
Update zone line numbers after scrolling
When the terminal scrolls, line numbers in scrollback increase. This method adjusts zone line numbers accordingly.
Trait Implementations§
Source§impl Clone for ZoneTracker
impl Clone for ZoneTracker
Source§fn clone(&self) -> ZoneTracker
fn clone(&self) -> ZoneTracker
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more