h l movement in add_table fixed for now
This commit is contained in:
@@ -121,31 +121,19 @@ pub fn handle_add_table_navigation(
|
|||||||
|
|
||||||
// --- Horizontal Navigation (Left/Right) ---
|
// --- Horizontal Navigation (Left/Right) ---
|
||||||
Some("next_option") => { // 'l' or Right: Move from Left Pane to Right Pane
|
Some("next_option") => { // 'l' or Right: Move from Left Pane to Right Pane
|
||||||
if is_left_pane_block_focus || is_inside_table_focus { // Treat inside same as block for exiting left
|
// Horizontal nav within bottom buttons
|
||||||
new_focus = match current_focus {
|
if current_focus == AddTableFocus::SaveButton {
|
||||||
// Map left pane items to corresponding right pane items (approximate vertical alignment)
|
new_focus = AddTableFocus::DeleteSelectedButton;
|
||||||
AddTableFocus::ColumnsTable | AddTableFocus::InsideColumnsTable => AddTableFocus::InputTableName,
|
} else if current_focus == AddTableFocus::DeleteSelectedButton {
|
||||||
AddTableFocus::IndexesTable | AddTableFocus::InsideIndexesTable => AddTableFocus::InputColumnName,
|
new_focus = AddTableFocus::CancelButton;
|
||||||
AddTableFocus::LinksTable | AddTableFocus::InsideLinksTable => AddTableFocus::SaveButton,
|
|
||||||
_ => current_focus, // Should not happen
|
|
||||||
};
|
|
||||||
} else if is_right_pane_general_focus || is_canvas_input_focus {
|
|
||||||
// Horizontal nav within bottom buttons
|
|
||||||
if current_focus == AddTableFocus::SaveButton { new_focus = AddTableFocus::DeleteSelectedButton; }
|
|
||||||
else if current_focus == AddTableFocus::DeleteSelectedButton { new_focus = AddTableFocus::CancelButton; }
|
|
||||||
else if current_focus == AddTableFocus::CancelButton { /* Stay */ }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Some("previous_option") => { // 'h' or Left: Move from Right Pane to Left Pane
|
Some("previous_option") => { // 'h' or Left: Move from Right Pane to Left Pane
|
||||||
if is_right_pane_general_focus || is_canvas_input_focus { // Treat canvas inputs same as right pane general for moving left
|
// Horizontal nav within bottom buttons
|
||||||
new_focus = match current_focus {
|
if current_focus == AddTableFocus::CancelButton {
|
||||||
// Map right pane items back to left pane items (approximate vertical alignment)
|
new_focus = AddTableFocus::DeleteSelectedButton;
|
||||||
AddTableFocus::InputTableName | AddTableFocus::InputColumnName | AddTableFocus::InputColumnType | AddTableFocus::AddColumnButton => AddTableFocus::ColumnsTable,
|
} else if current_focus == AddTableFocus::DeleteSelectedButton {
|
||||||
AddTableFocus::SaveButton | AddTableFocus::DeleteSelectedButton | AddTableFocus::CancelButton => AddTableFocus::LinksTable,
|
new_focus = AddTableFocus::SaveButton;
|
||||||
_ => current_focus, // Should not happen
|
|
||||||
};
|
|
||||||
} else if is_left_pane_block_focus || is_inside_table_focus { // Treat inside same as block for wrapping left
|
|
||||||
new_focus = AddTableFocus::CancelButton; // Wrap left-to-right bottom
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user