Do not start the initial reader if 'reload*' is bound to 'start'

This commit is contained in:
Junegunn Choi
2024-06-24 17:05:53 +09:00
parent 1525768094
commit 5b52833785
5 changed files with 51 additions and 7 deletions

View File

@@ -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
}