summaryrefslogtreecommitdiff
path: root/src/options.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-06-24 17:05:53 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-06-24 17:05:53 +0900
commit5b5283378571cca88a993630db3307319d2cb56d (patch)
tree65ab3b3c2cc5b01b93be50e5400c3f466be596db /src/options.go
parent15257680948bda849747465ac4edf5e9d90f2a52 (diff)
downloadfzf-5b5283378571cca88a993630db3307319d2cb56d.tar.gz
Do not start the initial reader if 'reload*' is bound to 'start'
Diffstat (limited to 'src/options.go')
-rw-r--r--src/options.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/options.go b/src/options.go
index fdf5f8dd..d9121c34 100644
--- a/src/options.go
+++ b/src/options.go
@@ -2945,3 +2945,18 @@ func ParseOptions(useDefaults bool, args []string) (*Options, error) {
return opts, nil
}
+
+func (opts *Options) reloadOnStart() bool {
+ // Not compatible with --filter
+ if opts.Filter != nil {
+ return false
+ }
+ if actions, prs := opts.Keymap[tui.Start.AsEvent()]; prs {
+ for _, action := range actions {
+ if action.t == actReload || action.t == actReloadSync {
+ return true
+ }
+ }
+ }
+ return false
+}