its now using enum fully for the highlight mode

This commit is contained in:
filipriec
2025-04-16 00:11:41 +02:00
parent af4567aa3d
commit b6c4d3308d
11 changed files with 103 additions and 95 deletions

View File

@@ -1,6 +1,7 @@
// src/modes/handlers/mode_manager.rs
use crate::state::app::state::AppState;
use crate::modes::handlers::event::EventHandler;
use crate::state::app::highlight::HighlightState;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AppMode {
@@ -20,7 +21,7 @@ impl ModeManager {
return AppMode::Command;
}
if event_handler.is_highlight_mode {
if !matches!(event_handler.highlight_state, HighlightState::Off) {
return AppMode::Highlight;
}