m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-14 06:13:47 -05:00

Fix race condition in asynchronous -1 and -0

This commit is contained in:
Junegunn Choi
2015-02-18 00:51:44 +09:00
parent 95e5beb34e
commit f5b034095a
4 changed files with 19 additions and 5 deletions

View File

@@ -12,6 +12,7 @@ type Merger struct {
merged []*Item
cursors []int
sorted bool
final bool
count int
}
@@ -22,6 +23,7 @@ func NewMerger(lists [][]*Item, sorted bool) *Merger {
merged: []*Item{},
cursors: make([]int, len(lists)),
sorted: sorted,
final: false,
count: 0}
for _, list := range mg.lists {