m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-15 23:03:47 -05: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:
Junegunn Choi
2015-01-11 23:49:12 +09:00
parent 1db68a3976
commit 9dbf6b02d2
7 changed files with 49 additions and 23 deletions

View File

@@ -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