mirror of
https://github.com/junegunn/fzf.git
synced 2026-05-18 06:19:56 +08:00
Fix race
This commit is contained in:
+1
-3
@@ -6410,9 +6410,6 @@ func (t *Terminal) Loop() error {
|
|||||||
select {
|
select {
|
||||||
case event = <-t.keyChan:
|
case event = <-t.keyChan:
|
||||||
needBarrier = true
|
needBarrier = true
|
||||||
if event.Type < tui.Invalid {
|
|
||||||
t.lastActivity = time.Now()
|
|
||||||
}
|
|
||||||
case event = <-t.timerChan:
|
case event = <-t.timerChan:
|
||||||
case event = <-t.eventChan:
|
case event = <-t.eventChan:
|
||||||
// Drain channel to process all queued events at once without rendering
|
// Drain channel to process all queued events at once without rendering
|
||||||
@@ -6480,6 +6477,7 @@ func (t *Terminal) Loop() error {
|
|||||||
previousVersion := t.version
|
previousVersion := t.version
|
||||||
if event.Type < tui.Invalid {
|
if event.Type < tui.Invalid {
|
||||||
t.lastKey = event.KeyName()
|
t.lastKey = event.KeyName()
|
||||||
|
t.lastActivity = time.Now()
|
||||||
}
|
}
|
||||||
updatePreviewWindow := func(forcePreview bool) {
|
updatePreviewWindow := func(forcePreview bool) {
|
||||||
t.resizeWindows(forcePreview, false)
|
t.resizeWindows(forcePreview, false)
|
||||||
|
|||||||
Reference in New Issue
Block a user