Add "last" action to move the cursor to the last match

This is the opposite of "first" (previously known as "top").
This commit is contained in:
Junegunn Choi
2020-12-30 01:51:25 +09:00
parent e9bc7331bd
commit 0de7ab18f6
5 changed files with 20 additions and 10 deletions

View File

@@ -265,7 +265,8 @@ const (
actExecuteSilent
actExecuteMulti // Deprecated
actSigStop
actTop
actFirst
actLast
actReload
)
@@ -2366,9 +2367,12 @@ func (t *Terminal) Loop() {
t.version++
req(reqList, reqInfo)
}
case actTop:
case actFirst:
t.vset(0)
req(reqList)
case actLast:
t.vset(t.merger.Length() - 1)
req(reqList)
case actUnixLineDiscard:
beof = len(t.input) == 0
if t.cx > 0 {