mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-14 08:59:01 +08:00
Fix condition for using item numlines cache (#4285)
This commit is contained in:
1 parent
c1accc2e5b
commit
cd1da27ff2
1 file changed
+1
-1
+1
-1
@@ -1347,7 +1347,7 @@ func (t *Terminal) numItemLines(item *Item, atMost int) (int, bool) {
|
|||||||
}
|
}
|
||||||
if cached, prs := t.numLinesCache[item.Index()]; prs {
|
if cached, prs := t.numLinesCache[item.Index()]; prs {
|
||||||
// Can we use this cache? Let's be conservative.
|
// Can we use this cache? Let's be conservative.
|
||||||
if cached.atMost >= atMost {
|
if cached.atMost <= atMost {
|
||||||
return cached.numLines, false
|
return cached.numLines, false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user