summary refs log tree commit diff stats
path: root/lib/ui
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-05-11 13:20:29 -0400
committerDrew DeVault <sir@cmpwn.com>2019-05-11 13:20:29 -0400
commit72e4b5e2b2e0de50b8572f195f73ccdd8e9d9461 (patch)
tree4d20a22bf099f2a3e3d8bd294fa84c6900945784 /lib/ui
parent8fa458323058c8998408f88b80d07c687fccd521 (diff)
downloadaerc-72e4b5e2b2e0de50b8572f195f73ccdd8e9d9461.tar.gz
Refactor ctx stashing out of exline
Diffstat (limited to 'lib/ui')
-rw-r--r--lib/ui/textinput.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ui/textinput.go b/lib/ui/textinput.go
index aff520b..542a1f8 100644
--- a/lib/ui/textinput.go
+++ b/lib/ui/textinput.go
@@ -57,6 +57,8 @@ func (ti *TextInput) Focus(focus bool) {
 	if focus && ti.ctx != nil {
 		cells := runewidth.StringWidth(string(ti.text[:ti.index]))
 		ti.ctx.SetCursor(cells+1, 0)
+	} else if !focus && ti.ctx != nil {
+		ti.ctx.HideCursor()
 	}
 }