SourceNavigation

Struct SourceNavigation 

Source
pub struct SourceNavigation;
Expand description

Handles source panel navigation functionality

Implementations§

Source§

impl SourceNavigation

Source

pub fn move_up(state: &mut SourcePanelState) -> Vec<Action>

Move cursor up

Source

pub fn move_down(state: &mut SourcePanelState) -> Vec<Action>

Move cursor down

Source

pub fn move_left(state: &mut SourcePanelState) -> Vec<Action>

Move cursor left

Source

pub fn move_right(state: &mut SourcePanelState) -> Vec<Action>

Move cursor right

Source

pub fn move_up_fast(state: &mut SourcePanelState) -> Vec<Action>

Fast move up (Page Up)

Source

pub fn move_down_fast(state: &mut SourcePanelState) -> Vec<Action>

Fast move down (Page Down)

Source

pub fn move_half_page_up(state: &mut SourcePanelState) -> Vec<Action>

Half page up (Ctrl+U) - move up 10 lines

Source

pub fn move_half_page_down(state: &mut SourcePanelState) -> Vec<Action>

Half page down (Ctrl+D) - move down 10 lines

Source

pub fn move_to_top(state: &mut SourcePanelState) -> Vec<Action>

Move to top of file

Source

pub fn move_to_bottom(state: &mut SourcePanelState) -> Vec<Action>

Move to bottom of file

Source

pub fn move_word_forward(state: &mut SourcePanelState) -> Vec<Action>

Move to next word (w key) - vim-style word movement

Source

pub fn move_word_backward(state: &mut SourcePanelState) -> Vec<Action>

Move to previous word (b key) - vim-style word movement

Source

pub fn move_to_line_start(state: &mut SourcePanelState) -> Vec<Action>

Move to line start (^ key) - beginning of line

Source

pub fn move_to_line_end(state: &mut SourcePanelState) -> Vec<Action>

Move to line end ($ key)

Source

pub fn jump_to_line( state: &mut SourcePanelState, line_number: usize, ) -> Vec<Action>

Jump to specific line

Source

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)

Source

pub fn handle_number_input( state: &mut SourcePanelState, ch: char, ) -> Vec<Action>

Handle number input for line jumping

Source

pub fn handle_g_key(state: &mut SourcePanelState) -> Vec<Action>

Handle ‘g’ key for navigation

Source

pub fn handle_shift_g_key(state: &mut SourcePanelState) -> Vec<Action>

Handle ‘G’ key for navigation

Source

pub fn load_source( state: &mut SourcePanelState, file_path: String, highlight_line: Option<usize>, ) -> Vec<Action>

Load source file

Source

pub fn clear_source(state: &mut SourcePanelState) -> Vec<Action>

Clear source content

Source

pub fn clear_all_state(state: &mut SourcePanelState) -> Vec<Action>

Clear all transient state (ESC behavior)

Source

pub fn show_error_message(state: &mut SourcePanelState, error_message: String)

Public method to display error message in source panel (for initialization errors)

Source

pub fn ensure_cursor_visible(state: &mut SourcePanelState, panel_height: u16)

Ensure cursor is visible in the current view with vim-style scrolloff

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more