mirror of
https://github.com/chshersh/github-tui.git
synced 2024-10-26 19:10:04 +03:00
Hide and show cursor
This commit is contained in:
parent
b2c44c181d
commit
063b01a111
@ -1,3 +1,3 @@
|
|||||||
open Minttea
|
open Minttea
|
||||||
|
|
||||||
let init _model = Command.Enter_alt_screen
|
let init _model = Command.(Seq [ Hide_cursor; Enter_alt_screen ])
|
||||||
|
@ -28,7 +28,7 @@ let update event (model : Model.t) =
|
|||||||
match event with
|
match event with
|
||||||
(* if we press `q` or the escape key, we exit *)
|
(* if we press `q` or the escape key, we exit *)
|
||||||
| Event.KeyDown ((Key "q" | Escape), _modifier) ->
|
| Event.KeyDown ((Key "q" | Escape), _modifier) ->
|
||||||
(model, Command.(Seq [ Exit_alt_screen; Quit ]))
|
(model, Command.(Seq [ Exit_alt_screen; Show_cursor; Quit ]))
|
||||||
(* if we press a digit, we switch to the corresponding tab *)
|
(* if we press a digit, we switch to the corresponding tab *)
|
||||||
| Event.KeyDown (Key "1", _modifier) ->
|
| Event.KeyDown (Key "1", _modifier) ->
|
||||||
({ model with current_tab = Model.Code }, Command.Noop)
|
({ model with current_tab = Model.Code }, Command.Noop)
|
||||||
|
Loading…
Reference in New Issue
Block a user