removing highlightmode from the app, handled by the library now
This commit is contained in:
@@ -17,8 +17,6 @@ use crate::components::{
|
||||
use crate::config::colors::themes::Theme;
|
||||
use crate::modes::general::command_navigation::NavigationState;
|
||||
use crate::state::app::buffer::BufferState;
|
||||
use crate::state::app::highlight::HighlightState as LocalHighlightState;
|
||||
use canvas::canvas::HighlightState as CanvasHighlightState;
|
||||
use crate::state::app::state::AppState;
|
||||
use crate::state::pages::admin::AdminState;
|
||||
use crate::state::pages::auth::AuthState;
|
||||
@@ -31,15 +29,6 @@ use ratatui::{
|
||||
Frame,
|
||||
};
|
||||
|
||||
// Helper function to convert between HighlightState types
|
||||
fn convert_highlight_state(local: &LocalHighlightState) -> CanvasHighlightState {
|
||||
match local {
|
||||
LocalHighlightState::Off => CanvasHighlightState::Off,
|
||||
LocalHighlightState::Characterwise { anchor } => CanvasHighlightState::Characterwise { anchor: *anchor },
|
||||
LocalHighlightState::Linewise { anchor_line } => CanvasHighlightState::Linewise { anchor_line: *anchor_line },
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn render_ui(
|
||||
f: &mut Frame,
|
||||
@@ -52,7 +41,6 @@ pub fn render_ui(
|
||||
buffer_state: &BufferState,
|
||||
theme: &Theme,
|
||||
is_event_handler_edit_mode: bool,
|
||||
highlight_state: &LocalHighlightState, // Keep using local version
|
||||
event_handler_command_input: &str,
|
||||
event_handler_command_mode_active: bool,
|
||||
event_handler_command_message: &str,
|
||||
@@ -205,13 +193,11 @@ pub fn render_ui(
|
||||
};
|
||||
|
||||
// CHANGED: Convert local HighlightState to canvas HighlightState for FormState
|
||||
let canvas_highlight_state = convert_highlight_state(highlight_state);
|
||||
form_state.render(
|
||||
f,
|
||||
form_render_area,
|
||||
theme,
|
||||
is_event_handler_edit_mode,
|
||||
&canvas_highlight_state, // Use converted version
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user