h l movement in add_table fixed for now
This commit is contained in:
@@ -121,32 +121,20 @@ pub fn handle_add_table_navigation(
|
||||
|
||||
// --- Horizontal Navigation (Left/Right) ---
|
||||
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
|
||||
new_focus = match current_focus {
|
||||
// Map left pane items to corresponding right pane items (approximate vertical alignment)
|
||||
AddTableFocus::ColumnsTable | AddTableFocus::InsideColumnsTable => AddTableFocus::InputTableName,
|
||||
AddTableFocus::IndexesTable | AddTableFocus::InsideIndexesTable => AddTableFocus::InputColumnName,
|
||||
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 */ }
|
||||
}
|
||||
// Horizontal nav within bottom buttons
|
||||
if current_focus == AddTableFocus::SaveButton {
|
||||
new_focus = AddTableFocus::DeleteSelectedButton;
|
||||
} else if current_focus == AddTableFocus::DeleteSelectedButton {
|
||||
new_focus = AddTableFocus::CancelButton;
|
||||
}
|
||||
}
|
||||
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
|
||||
new_focus = match current_focus {
|
||||
// Map right pane items back to left pane items (approximate vertical alignment)
|
||||
AddTableFocus::InputTableName | AddTableFocus::InputColumnName | AddTableFocus::InputColumnType | AddTableFocus::AddColumnButton => AddTableFocus::ColumnsTable,
|
||||
AddTableFocus::SaveButton | AddTableFocus::DeleteSelectedButton | AddTableFocus::CancelButton => AddTableFocus::LinksTable,
|
||||
_ => 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
|
||||
}
|
||||
// Horizontal nav within bottom buttons
|
||||
if current_focus == AddTableFocus::CancelButton {
|
||||
new_focus = AddTableFocus::DeleteSelectedButton;
|
||||
} else if current_focus == AddTableFocus::DeleteSelectedButton {
|
||||
new_focus = AddTableFocus::SaveButton;
|
||||
}
|
||||
}
|
||||
|
||||
// --- Tab / Shift+Tab Navigation (Keep as vertical cycle) ---
|
||||
|
||||
Reference in New Issue
Block a user