mirror of
https://github.com/junegunn/fzf.git
synced 2026-10-04 19:28:58 +08:00
Fix race conditions
- Wait for completions of goroutines when cancelling a search - Remove shared access to rank field of Item
This commit is contained in:
1 parent
1db68a3976
commit
9dbf6b02d2
7 files changed
+49
-23
No files matched your search
+1
-1
@@ -57,7 +57,7 @@ func (mg *Merger) mergedGet(idx int) *Item {
|
||||
continue
|
||||
}
|
||||
if cursor >= 0 {
|
||||
rank := list[cursor].Rank()
|
||||
rank := list[cursor].Rank(false)
|
||||
if minIdx < 0 || compareRanks(rank, minRank) {
|
||||
minRank = rank
|
||||
minIdx = listIdx
|
||||
|
||||
Reference in new issue
Block a user