diff --git a/tui.c b/tui.c index aa86d4c..6ffbaf1 100644 --- a/tui.c +++ b/tui.c @@ -1002,16 +1002,16 @@ void tui_run(Engine *engine) { if (zoom_mode) { switch (ch) { case 'h': case KEY_LEFT: - selected_col = (selected_col - 1 + GRID_COLS) % GRID_COLS; + selected_grid = (selected_grid - 1 + NUM_GRIDS) % NUM_GRIDS; break; case 'l': case KEY_RIGHT: - selected_col = (selected_col + 1) % GRID_COLS; + selected_grid = (selected_grid + 1) % NUM_GRIDS; break; case 'j': case KEY_DOWN: - selected_row = (selected_row + 1) % GRID_ROWS; + selected_grid = (selected_grid + 4) % NUM_GRIDS; // Move down a row (4 grids per row) break; case 'k': case KEY_UP: - selected_row = (selected_row - 1 + GRID_ROWS) % GRID_ROWS; + selected_grid = (selected_grid - 4 + NUM_GRIDS) % NUM_GRIDS; // Move up a row break; case '\n': case '\r': // Select this grid and exit zoom mode