ui debug in status line
This commit is contained in:
@@ -6,6 +6,8 @@ use crate::modes::handlers::mode_manager::AppMode;
|
||||
use crate::ui::handlers::context::DialogPurpose;
|
||||
use crate::state::app::search::SearchState; // ADDED
|
||||
use anyhow::Result;
|
||||
#[cfg(feature = "ui-debug")]
|
||||
use std::time::Instant;
|
||||
|
||||
// --- YOUR EXISTING DIALOGSTATE IS UNTOUCHED ---
|
||||
pub struct DialogState {
|
||||
@@ -33,6 +35,14 @@ pub struct UiState {
|
||||
pub dialog: DialogState,
|
||||
}
|
||||
|
||||
#[cfg(feature = "ui-debug")]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct DebugState {
|
||||
pub displayed_message: String,
|
||||
pub is_error: bool,
|
||||
pub display_start_time: Instant,
|
||||
}
|
||||
|
||||
pub struct AppState {
|
||||
// Core editor state
|
||||
pub current_dir: String,
|
||||
@@ -52,7 +62,7 @@ pub struct AppState {
|
||||
pub ui: UiState,
|
||||
|
||||
#[cfg(feature = "ui-debug")]
|
||||
pub debug_info: String,
|
||||
pub debug_state: Option<DebugState>,
|
||||
}
|
||||
|
||||
impl AppState {
|
||||
@@ -73,7 +83,7 @@ impl AppState {
|
||||
ui: UiState::default(),
|
||||
|
||||
#[cfg(feature = "ui-debug")]
|
||||
debug_info: String::new(),
|
||||
debug_state: None,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user