From 986b446749e69873dd46bdb6b062464ec0169a71 Mon Sep 17 00:00:00 2001 From: Anthony Eid <56899983+Anthony-Eid@users.noreply.github.com> Date: Wed, 23 Jul 2025 12:18:55 -0400 Subject: [PATCH] keymap ui: Resizable column follow up (#34955) I cherry picked a small fix that didn't get into the original column resizable branch PR because I turned on auto merge. Release Notes: - N/A --- crates/settings_ui/src/ui_components/table.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/settings_ui/src/ui_components/table.rs b/crates/settings_ui/src/ui_components/table.rs index 70472918d2b7cbe199922c53d3208daf45062825..35f2c773067b0f98013c620694cba5649e40fa67 100644 --- a/crates/settings_ui/src/ui_components/table.rs +++ b/crates/settings_ui/src/ui_components/table.rs @@ -521,7 +521,7 @@ impl ColumnWidths { let mut curr_column = double_click_position + 1; let mut diff_left = diff; - while diff != 0.0 && curr_column < COLS { + while diff_left != 0.0 && curr_column < COLS { let Some(min_size) = resize_behavior[curr_column].min_size() else { curr_column += 1; continue; @@ -607,8 +607,7 @@ impl ColumnWidths { curr_column = col_idx; // Resize behavior should be improved in the future by also seeking to the right column when there's not enough space while diff_left < 0.0 { - let Some(min_size) = resize_behavior[curr_column.saturating_sub(1)].min_size() - else { + let Some(min_size) = resize_behavior[curr_column].min_size() else { if curr_column == 0 { break; }