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 {
|
||||
case event = <-t.keyChan:
|
||||
needBarrier = true
|
||||
if event.Type < tui.Invalid {
|
||||
t.lastActivity = time.Now()
|
||||
}
|
||||
case event = <-t.timerChan:
|
||||
case event = <-t.eventChan:
|
||||
// Drain channel to process all queued events at once without rendering
|
||||
@@ -6480,6 +6477,7 @@ func (t *Terminal) Loop() error {
|
||||
previousVersion := t.version
|
||||
if event.Type < tui.Invalid {
|
||||
t.lastKey = event.KeyName()
|
||||
t.lastActivity = time.Now()
|
||||
}
|
||||
updatePreviewWindow := func(forcePreview bool) {
|
||||
t.resizeWindows(forcePreview, false)
|
||||
|
||||
Reference in New Issue
Block a user