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
This commit is contained in:
Anthony Eid 2025-07-23 12:18:55 -04:00 committed by GitHub
parent 8713c556d6
commit 986b446749
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -521,7 +521,7 @@ impl<const COLS: usize> ColumnWidths<COLS> {
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<const COLS: usize> ColumnWidths<COLS> {
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;
}