internal/uidriver/js: Bug fix: SetCursorMode didn't work

This commit is contained in:
Hajime Hoshi 2021-04-16 01:21:48 +09:00
parent d00d0c8556
commit 3c1226a227

View File

@ -136,12 +136,12 @@ func (u *UserInterface) SetCursorMode(mode driver.CursorMode) {
switch mode { switch mode {
case driver.CursorModeVisible: case driver.CursorModeVisible:
if u.cursorHidden { if !u.cursorHidden {
return return
} }
u.cursorHidden = false u.cursorHidden = false
case driver.CursorModeHidden: case driver.CursorModeHidden:
if !u.cursorHidden { if u.cursorHidden {
return return
} }
u.cursorHidden = true u.cursorHidden = true