hide cursor
parent
da04fa7ef5
commit
c825888147
|
@ -77,6 +77,7 @@ func (menu *MainMenu) Event(state *ui.State, event vaxis.Event) (processed bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
func showManpage(state *ui.State) {
|
func showManpage(state *ui.State) {
|
||||||
|
state.HideCursor()
|
||||||
vt := term.New()
|
vt := term.New()
|
||||||
vt.TERM = os.Getenv("TERM")
|
vt.TERM = os.Getenv("TERM")
|
||||||
vt.Attach(state.PostEvent())
|
vt.Attach(state.PostEvent())
|
||||||
|
@ -90,6 +91,7 @@ func showManpage(state *ui.State) {
|
||||||
for ev := range state.Events() {
|
for ev := range state.Events() {
|
||||||
switch ev.(type) {
|
switch ev.(type) {
|
||||||
case term.EventClosed:
|
case term.EventClosed:
|
||||||
|
state.HideCursor()
|
||||||
state.Window().Clear()
|
state.Window().Clear()
|
||||||
return
|
return
|
||||||
case vaxis.Redraw:
|
case vaxis.Redraw:
|
||||||
|
|
4
ui/ui.go
4
ui/ui.go
|
@ -76,6 +76,10 @@ func (state *State) Render() {
|
||||||
state.vx.Render()
|
state.vx.Render()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (state *State) HideCursor() {
|
||||||
|
state.vx.HideCursor()
|
||||||
|
}
|
||||||
|
|
||||||
func (state *State) Window() vaxis.Window {
|
func (state *State) Window() vaxis.Window {
|
||||||
return state.vx.Window()
|
return state.vx.Window()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue