Add support for <C-j> as '<Enter>' in ExLine

This commit is contained in:
Christopher Vittal 2019-08-18 01:37:49 -04:00 committed by Drew DeVault
parent 9fd6054ca1
commit cc639a1e65

View file

@ -50,7 +50,7 @@ func (ex *ExLine) Event(event tcell.Event) bool {
switch event := event.(type) { switch event := event.(type) {
case *tcell.EventKey: case *tcell.EventKey:
switch event.Key() { switch event.Key() {
case tcell.KeyEnter: case tcell.KeyEnter, tcell.KeyCtrlJ:
cmd := ex.input.String() cmd := ex.input.String()
ex.input.Focus(false) ex.input.Focus(false)
ex.commit(cmd) ex.commit(cmd)