1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-25 22:33:52 +03:00

fix: fixed palette selected row position on move down

This commit is contained in:
metiftikci 2024-01-23 00:24:46 +03:00 committed by Wez Furlong
parent 76028ca154
commit ff4e648834

View File

@ -567,7 +567,7 @@ impl CommandPalette {
let mut row = self.selected_row.borrow_mut();
*row = row.saturating_add(1).min(limit);
let mut top_row = self.top_row.borrow_mut();
if *row + *top_row > max_rows_on_screen - 1 {
if *row > *top_row + max_rows_on_screen - 1 {
*top_row = row.saturating_sub(max_rows_on_screen - 1);
}
}