Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
keymap ui: Resizable column follow up (#34955)
Anthony Eid986b446749e6
diff --git a/crates/settings_ui/src/ui_components/table.rs b/crates/settings_ui/src/ui_components/table.rsindex 70472918d2b..35f2c773067 100644--- a/crates/settings_ui/src/ui_components/table.rs+++ b/crates/settings_ui/src/ui_components/table.rs@@ -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 spacewhile 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;}