fixing is_edit_mode flag removal

This commit is contained in:
filipriec
2025-08-24 16:37:30 +02:00
parent f6c2fd627f
commit b2a82fba30
7 changed files with 210 additions and 134 deletions

View File

@@ -34,7 +34,7 @@ pub fn render_add_logic(
// Handle full-screen script editing
if add_logic_state.current_focus == AddLogicFocus::InsideScriptContent {
let mut editor_ref = add_logic_state.script_content_editor.borrow_mut();
let border_style_color = if editor.mode() == canvas::AppMode::Edit {
let border_style_color = if crate::components::common::text_editor::TextEditor::is_vim_insert_mode(&add_logic_state.vim_state) {
theme.highlight
} else {
theme.secondary
@@ -50,7 +50,7 @@ pub fn render_add_logic(
format!("Script {}", vim_mode_status)
}
EditorKeybindingMode::Emacs | EditorKeybindingMode::Default => {
if editor.mode() == canvas::AppMode::Edit {
if crate::components::common::text_editor::TextEditor::is_vim_insert_mode(&add_logic_state.vim_state) {
"Script (Editing)".to_string()
} else {
"Script".to_string()

View File

@@ -20,7 +20,6 @@ pub fn render_add_table(
theme: &Theme,
app_state: &AppState,
add_table_state: &mut AddTableState,
is_edit_mode: bool, // Determines if canvas inputs are in edit mode
) {
// --- Configuration ---
// Threshold width to switch between wide and narrow layouts