Correct cursor shape when inputting search query

This commit is contained in:
Kovid Goyal 2023-03-23 08:01:34 +05:30
parent c19c614d9e
commit 1926db8ee8
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -139,6 +139,7 @@ func main(_ *cli.Command, opts_ *Options, args []string) (rc int, err error) {
h := Handler{left: left, right: right, lp: lp} h := Handler{left: left, right: right, lp: lp}
lp.OnInitialize = func() (string, error) { lp.OnInitialize = func() (string, error) {
lp.SetCursorVisible(false) lp.SetCursorVisible(false)
lp.SetCursorShape(loop.BAR_CURSOR, true)
lp.AllowLineWrapping(false) lp.AllowLineWrapping(false)
lp.SetWindowTitle(fmt.Sprintf("%s vs. %s", left, right)) lp.SetWindowTitle(fmt.Sprintf("%s vs. %s", left, right))
h.initialize() h.initialize()
@ -147,6 +148,7 @@ func main(_ *cli.Command, opts_ *Options, args []string) (rc int, err error) {
lp.OnWakeup = h.on_wakeup lp.OnWakeup = h.on_wakeup
lp.OnFinalize = func() string { lp.OnFinalize = func() string {
lp.SetCursorVisible(true) lp.SetCursorVisible(true)
lp.SetCursorShape(loop.BLOCK_CURSOR, true)
return "" return ""
} }
lp.OnResize = h.on_resize lp.OnResize = h.on_resize