pub struct EditorView {Show 23 fields
pub buffer: Buffer,
pub folds: FoldState,
pub highlighter: SyntaxHighlighter,
pub gutter_markers: Vec<GutterMarker>,
pub status_msg: Option<String>,
pub completion: Option<CompletionState>,
pub hover: Option<HoverState>,
pub lsp_version: i32,
pub deferred_ops: Vec<Operation>,
pub search: Option<SearchState>,
pub last_search: Option<SearchState>,
pub go_to_line: Option<GoToLineState>,
pub word_wrap: bool,
pub show_line_numbers: bool,
pub use_space: bool,
pub indentation_width: usize,
pub highlight_cache: HashMap<usize, Vec<StyledSpan>>,
pub pending_highlight_lines: HashSet<usize>,
pub stale_highlight_lines: HashSet<usize>,
pub highlight_task: Option<JoinHandle<()>>,
pub highlight_generation: u64,
pub external_conflict_msg: Option<String>,
pub lang_id: Option<LanguageId>,
/* private fields */
}Fields§
§buffer: Buffer§folds: FoldState§highlighter: SyntaxHighlighter§gutter_markers: Vec<GutterMarker>§status_msg: Option<String>§completion: Option<CompletionState>§hover: Option<HoverState>§lsp_version: i32Incremented on every buffer change; sent with textDocument/didChange.
deferred_ops: Vec<Operation>Secondary ops produced by completion-confirm that the view needs to emit but cannot return from handle_operation. Drained by app.rs.
search: Option<SearchState>Active search/replace state; None when bar is closed.
last_search: Option<SearchState>Last committed search; kept alive after the bar closes so F3 still works.
go_to_line: Option<GoToLineState>Active go-to-line bar state; None when closed.
word_wrap: boolWhen true, long lines are soft-wrapped instead of clipped horizontally.
show_line_numbers: boolWhen true, line numbers are shown in the gutter.
use_space: boolWhen true, use spaces for indentation; otherwise use tabs.
indentation_width: usizeNumber of spaces (or tab width) for indentation.
highlight_cache: HashMap<usize, Vec<StyledSpan>>Fully computed highlight cache keyed by line number. Lines are never erased on edits — only updated when recomputed.
pending_highlight_lines: HashSet<usize>Lines currently being computed in background (avoid redundant tasks).
stale_highlight_lines: HashSet<usize>Lines whose cached spans are stale (content changed) but are kept in
highlight_cache for flicker-free rendering until fresh results arrive.
highlight_task: Option<JoinHandle<()>>Handle for the in-flight background highlight task.
highlight_generation: u64Generation counter for highlight tasks. Incremented on each edit to detect and discard stale completions.
external_conflict_msg: Option<String>Message shown when external modification is detected.
lang_id: Option<LanguageId>Detected language of the open file (e.g. "rust", "python").
Implementations§
Source§impl EditorView
impl EditorView
pub fn open(buffer: Buffer, folds: FoldState, settings: &Settings) -> Self
pub fn into_state(self) -> (Buffer, FoldState)
Sourcepub fn take_deferred_ops(&mut self) -> Vec<Operation>
pub fn take_deferred_ops(&mut self) -> Vec<Operation>
Drain any secondary ops produced during the last handle_operation call.
pub fn start_file_watching(&mut self)
pub fn stop_file_watching(&mut self)
pub fn check_external_modification_for_paths( &mut self, changed_paths: &[PathBuf], ) -> bool
pub fn reload_from_disk(&mut self) -> Result<()>
pub fn clear_external_modification(&mut self)
Source§impl EditorView
impl EditorView
Trait Implementations§
Source§impl Debug for EditorView
impl Debug for EditorView
Source§impl View for EditorView
impl View for EditorView
Source§fn handle_key(&self, key: KeyEvent) -> Vec<Operation>
fn handle_key(&self, key: KeyEvent) -> Vec<Operation>
Translate key input into operations — no mutation of self.
Source§fn handle_operation(
&mut self,
op: &Operation,
_settings: &Settings,
) -> Option<Event>
fn handle_operation( &mut self, op: &Operation, _settings: &Settings, ) -> Option<Event>
Apply operations this view owns. Ignores ops that belong elsewhere.
Source§fn save_state(&mut self, app: &mut AppState)
fn save_state(&mut self, app: &mut AppState)
Source§fn handle_mouse(&self, mouse: MouseEvent) -> Vec<Operation>
fn handle_mouse(&self, mouse: MouseEvent) -> Vec<Operation>
Source§fn render(&self, frame: &mut Frame<'_>, area: Rect, _theme: &Theme)
fn render(&self, frame: &mut Frame<'_>, area: Rect, _theme: &Theme)
area of the current frame.Source§fn status_bar(&self, _state: &AppState, bar: &mut StatusBarBuilder)
fn status_bar(&self, _state: &AppState, bar: &mut StatusBarBuilder)
Auto Trait Implementations§
impl !Freeze for EditorView
impl !RefUnwindSafe for EditorView
impl Send for EditorView
impl !Sync for EditorView
impl Unpin for EditorView
impl UnsafeUnpin for EditorView
impl UnwindSafe for EditorView
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.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