Add 'best' action

This commit is contained in:
Junegunn Choi committed 2025-10-09 00:17:00 +09:00
1 parent ed7becfb47
commit d19ce0ad8d
5 files changed
+68 -22

No files matched your search

+9 -2
View File
@@ -663,6 +663,7 @@ const (
actExecuteSilent
actExecuteMulti // Deprecated
actSigStop
actBest
actFirst
actLast
actReload
@@ -6203,8 +6204,14 @@ func (t *Terminal) Loop() error {
t.version++
req(reqList, reqInfo)
}
case actFirst:
t.vset(0)
case actFirst, actBest:
if t.raw && a.t == actBest {
if t.resultMerger.Length() > 0 {
t.vset(t.merger.FindIndex(t.resultMerger.Get(0).item.Index()))
}
} else {
t.vset(0)
}
t.constrain()
req(reqList)
case actLast: