diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2023-04-29 21:27:30 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2023-04-30 18:14:40 +0900 |
commit | 77f9f4664ac9002358735f152ea429e2a578aee2 (patch) | |
tree | f14e6149f252cacced75428aa5a0ac87a1c12e06 /src/terminal.go | |
parent | 5c2f85c39e98d6fcf70cbc887de7a1af1b0d9c52 (diff) |
Fix search not triggered when query change and reload happen at the same time
Fix #3268
Diffstat (limited to 'src/terminal.go')
-rw-r--r-- | src/terminal.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go index 3dc2062f..b0771f16 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -408,6 +408,7 @@ type searchRequest struct { sort bool sync bool command *string + changed bool } type previewRequest struct { @@ -3622,7 +3623,7 @@ func (t *Terminal) Loop() { t.mutex.Unlock() // Must be unlocked before touching reqBox if changed || newCommand != nil { - t.eventBox.Set(EvtSearchNew, searchRequest{sort: t.sort, sync: reloadSync, command: newCommand}) + t.eventBox.Set(EvtSearchNew, searchRequest{sort: t.sort, sync: reloadSync, command: newCommand, changed: changed}) } for _, event := range events { t.reqBox.Set(event, nil) |