Hide and show cursor

This commit is contained in:
Dmitrii Kovanikov 2024-06-24 18:52:07 +01:00
parent b2c44c181d
commit 063b01a111
2 changed files with 2 additions and 2 deletions

View File

@ -1,3 +1,3 @@
open Minttea
let init _model = Command.Enter_alt_screen
let init _model = Command.(Seq [ Hide_cursor; Enter_alt_screen ])

View File

@ -28,7 +28,7 @@ let update event (model : Model.t) =
match event with
(* if we press `q` or the escape key, we exit *)
| 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 *)
| Event.KeyDown (Key "1", _modifier) ->
({ model with current_tab = Model.Code }, Command.Noop)