fix: fixed palette selected row position on move down
This commit is contained in:
1 parent
76028ca154
commit
ff4e648834
1 file changed
+1
-1
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user