removing highlightmode from the app, handled by the library now

This commit is contained in:
Priec
2025-08-21 10:33:52 +02:00
parent 1320884409
commit 11b073c2fd
11 changed files with 54 additions and 131 deletions

View File

@@ -3,4 +3,3 @@
pub mod state;
pub mod buffer;
pub mod search;
pub mod highlight;

View File

@@ -1,20 +0,0 @@
// src/state/app/highlight.rs
/// Represents the different states of text highlighting.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum HighlightState {
/// Highlighting is inactive.
Off,
/// Highlighting character by character. Stores the anchor point (line index, char index).
Characterwise { anchor: (usize, usize) },
/// Highlighting line by line. Stores the anchor line index.
Linewise { anchor_line: usize },
}
impl Default for HighlightState {
/// The default state is no highlighting.
fn default() -> Self {
HighlightState::Off
}
}

View File

@@ -2,7 +2,6 @@
use crate::config::colors::themes::Theme;
use canvas::{DataProvider, AppMode, EditorState, FormEditor};
use canvas::canvas::HighlightState;
use common::proto::komp_ac::search::search_response::Hit;
use ratatui::layout::Rect;
use ratatui::Frame;
@@ -123,7 +122,6 @@ impl FormState {
area: Rect,
theme: &Theme,
is_edit_mode: bool,
highlight_state: &HighlightState,
) {
// Wrap in FormEditor for new API
let mut editor = FormEditor::new(self.clone());