Add unbound "toggle" action for customization

This commit is contained in:
Junegunn Choi
2015-05-21 01:35:35 +09:00
parent 34946b72a5
commit 801cf9ac62
3 changed files with 11 additions and 2 deletions

View File

@@ -105,6 +105,7 @@ const (
actUnixWordRubout
actYank
actBackwardKillWord
actToggle
actToggleDown
actToggleUp
actDown
@@ -724,6 +725,11 @@ func (t *Terminal) Loop() {
t.input = append(t.input[:t.cx-1], t.input[t.cx:]...)
t.cx--
}
case actToggle:
if t.multi && t.merger.Length() > 0 {
toggle()
req(reqList)
}
case actToggleDown:
if t.multi && t.merger.Length() > 0 {
toggle()