Fix race
CodeQL / Analyze (go) (push) Waiting to run
build / build (push) Waiting to run
Test fzf on macOS / build (push) Waiting to run

This commit is contained in:
Junegunn Choi
2026-05-17 22:59:22 +09:00
parent 21a1977c3f
commit 7e52235f22
+1 -3
View File
@@ -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)