pub struct SourceNavigation;Expand description
Handles source panel navigation functionality
Implementations§
Sourcepub fn move_up(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_up(state: &mut SourcePanelState) -> Vec<Action>
Move cursor up
Sourcepub fn move_down(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_down(state: &mut SourcePanelState) -> Vec<Action>
Move cursor down
Sourcepub fn move_left(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_left(state: &mut SourcePanelState) -> Vec<Action>
Move cursor left
Sourcepub fn move_right(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_right(state: &mut SourcePanelState) -> Vec<Action>
Move cursor right
Sourcepub fn move_up_fast(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_up_fast(state: &mut SourcePanelState) -> Vec<Action>
Fast move up (Page Up)
Sourcepub fn move_down_fast(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_down_fast(state: &mut SourcePanelState) -> Vec<Action>
Fast move down (Page Down)
Sourcepub fn move_half_page_up(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_half_page_up(state: &mut SourcePanelState) -> Vec<Action>
Half page up (Ctrl+U) - move up 10 lines
Sourcepub fn move_half_page_down(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_half_page_down(state: &mut SourcePanelState) -> Vec<Action>
Half page down (Ctrl+D) - move down 10 lines
Sourcepub fn move_to_top(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_to_top(state: &mut SourcePanelState) -> Vec<Action>
Move to top of file
Sourcepub fn move_to_bottom(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_to_bottom(state: &mut SourcePanelState) -> Vec<Action>
Move to bottom of file
Sourcepub fn move_word_forward(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_word_forward(state: &mut SourcePanelState) -> Vec<Action>
Move to next word (w key) - vim-style word movement
Sourcepub fn move_word_backward(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_word_backward(state: &mut SourcePanelState) -> Vec<Action>
Move to previous word (b key) - vim-style word movement
Sourcepub fn move_to_line_start(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_to_line_start(state: &mut SourcePanelState) -> Vec<Action>
Move to line start (^ key) - beginning of line
Sourcepub fn move_to_line_end(state: &mut SourcePanelState) -> Vec<Action>
pub fn move_to_line_end(state: &mut SourcePanelState) -> Vec<Action>
Move to line end ($ key)
Sourcepub fn jump_to_line(
state: &mut SourcePanelState,
line_number: usize,
) -> Vec<Action>
pub fn jump_to_line( state: &mut SourcePanelState, line_number: usize, ) -> Vec<Action>
Jump to specific line
Sourcepub fn go_to_line(
state: &mut SourcePanelState,
line_number: usize,
) -> Vec<Action>
pub fn go_to_line( state: &mut SourcePanelState, line_number: usize, ) -> Vec<Action>
Go to specific line (alias for jump_to_line to match Action handler)
Sourcepub fn handle_number_input(
state: &mut SourcePanelState,
ch: char,
) -> Vec<Action>
pub fn handle_number_input( state: &mut SourcePanelState, ch: char, ) -> Vec<Action>
Handle number input for line jumping
Sourcepub fn handle_g_key(state: &mut SourcePanelState) -> Vec<Action>
pub fn handle_g_key(state: &mut SourcePanelState) -> Vec<Action>
Handle ‘g’ key for navigation
Sourcepub fn handle_shift_g_key(state: &mut SourcePanelState) -> Vec<Action>
pub fn handle_shift_g_key(state: &mut SourcePanelState) -> Vec<Action>
Handle ‘G’ key for navigation
Sourcepub fn load_source(
state: &mut SourcePanelState,
file_path: String,
highlight_line: Option<usize>,
) -> Vec<Action>
pub fn load_source( state: &mut SourcePanelState, file_path: String, highlight_line: Option<usize>, ) -> Vec<Action>
Load source file
Sourcepub fn clear_source(state: &mut SourcePanelState) -> Vec<Action>
pub fn clear_source(state: &mut SourcePanelState) -> Vec<Action>
Clear source content
Sourcepub fn clear_all_state(state: &mut SourcePanelState) -> Vec<Action>
pub fn clear_all_state(state: &mut SourcePanelState) -> Vec<Action>
Clear all transient state (ESC behavior)
Sourcepub fn show_error_message(state: &mut SourcePanelState, error_message: String)
pub fn show_error_message(state: &mut SourcePanelState, error_message: String)
Public method to display error message in source panel (for initialization errors)
Sourcepub fn ensure_cursor_visible(state: &mut SourcePanelState, panel_height: u16)
pub fn ensure_cursor_visible(state: &mut SourcePanelState, panel_height: u16)
Ensure cursor is visible in the current view with vim-style scrolloff
Sourcepub fn ensure_horizontal_cursor_visible(
state: &mut SourcePanelState,
panel_width: u16,
)
pub fn ensure_horizontal_cursor_visible( state: &mut SourcePanelState, panel_width: u16, )
Ensure horizontal cursor is visible
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more