diff options
Diffstat (limited to 'widgets/exline.go')
-rw-r--r-- | widgets/exline.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/widgets/exline.go b/widgets/exline.go index 77f1414..7eff74a 100644 --- a/widgets/exline.go +++ b/widgets/exline.go @@ -121,10 +121,14 @@ func (ex *ExLine) Event(event tcell.Event) bool { case tcell.KeyCtrlW: ex.deleteWord() case tcell.KeyEnter: - ex.ctx.HideCursor() + if ex.ctx != nil { + ex.ctx.HideCursor() + } ex.commit(string(ex.command)) case tcell.KeyEsc, tcell.KeyCtrlC: - ex.ctx.HideCursor() + if ex.ctx != nil { + ex.ctx.HideCursor() + } ex.cancel() case tcell.KeyRune: ex.insert(event.Rune()) |