From 5b5283378571cca88a993630db3307319d2cb56d Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 24 Jun 2024 17:05:53 +0900 Subject: Do not start the initial reader if 'reload*' is bound to 'start' --- src/options.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/options.go') 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 +} -- cgit v1.2.3