parent
759b850859
commit
4044c70eb2
1 changed files with 1 additions and 1 deletions
|
@ -500,7 +500,7 @@ impl<T: 'static> Component for Picker<T> {
|
||||||
let selected = cx.editor.theme.get("ui.text.focus");
|
let selected = cx.editor.theme.get("ui.text.focus");
|
||||||
|
|
||||||
let rows = inner.height;
|
let rows = inner.height;
|
||||||
let offset = self.cursor / std::cmp::max(1, (rows as usize) * (rows as usize));
|
let offset = self.cursor - (self.cursor % std::cmp::max(1, rows as usize));
|
||||||
|
|
||||||
let files = self.matches.iter().skip(offset).map(|(index, _score)| {
|
let files = self.matches.iter().skip(offset).map(|(index, _score)| {
|
||||||
(index, self.options.get(*index).unwrap()) // get_unchecked
|
(index, self.options.get(*index).unwrap()) // get_unchecked
|
||||||
|
|
Loading…
Add table
Reference in a new issue