mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-22 21:05:09 +00:00
Fix typo in code
This commit is contained in:
parent
1b5599972a
commit
d760b790b3
@ -183,7 +183,7 @@ func (m *Matcher) scan(request MatchRequest, limit int) (*Merger, bool) {
|
||||
break
|
||||
}
|
||||
|
||||
if !empty && m.reqBox.Peak(reqReset) {
|
||||
if !empty && m.reqBox.Peek(reqReset) {
|
||||
return nil, wait()
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ func TestReadFromCommand(t *testing.T) {
|
||||
eventBox: eb}
|
||||
|
||||
// Check EventBox
|
||||
if eb.Peak(EvtReadNew) {
|
||||
if eb.Peek(EvtReadNew) {
|
||||
t.Error("EvtReadNew should not be set yet")
|
||||
}
|
||||
|
||||
@ -25,7 +25,7 @@ func TestReadFromCommand(t *testing.T) {
|
||||
}
|
||||
|
||||
// Check EventBox again
|
||||
if !eb.Peak(EvtReadNew) {
|
||||
if !eb.Peek(EvtReadNew) {
|
||||
t.Error("EvtReadNew should be set yet")
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ func TestReadFromCommand(t *testing.T) {
|
||||
})
|
||||
|
||||
// EventBox is cleared
|
||||
if eb.Peak(EvtReadNew) {
|
||||
if eb.Peek(EvtReadNew) {
|
||||
t.Error("EvtReadNew should not be set yet")
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ func TestReadFromCommand(t *testing.T) {
|
||||
}
|
||||
|
||||
// Check EventBox again
|
||||
if eb.Peak(EvtReadNew) {
|
||||
if eb.Peek(EvtReadNew) {
|
||||
t.Error("Command failed. EvtReadNew should be set")
|
||||
}
|
||||
}
|
||||
|
@ -53,8 +53,8 @@ func (events *Events) Clear() {
|
||||
}
|
||||
}
|
||||
|
||||
// Peak peaks at the event box if the given event is set
|
||||
func (b *EventBox) Peak(event EventType) bool {
|
||||
// Peek peeks at the event box if the given event is set
|
||||
func (b *EventBox) Peek(event EventType) bool {
|
||||
b.cond.L.Lock()
|
||||
defer b.cond.L.Unlock()
|
||||
_, ok := b.events[event]
|
||||
|
Loading…
Reference in New Issue
Block a user