diff options
author | Marc Coquand <marc@mccd.space> | 2024-05-15 11:17:48 -0500 |
---|---|---|
committer | Marc Coquand <marc@mccd.space> | 2024-05-15 11:17:48 -0500 |
commit | db4e445ee0f29c1179b5d0746217e5b5525ff3e2 (patch) | |
tree | 1f30d6f7d3305d7f8becbed3297b033899d9251f /lib/todos.ml | |
parent | 47be0ea3eeb774102f02b5f85ee974afe6a8170e (diff) | |
download | stitch-db4e445ee0f29c1179b5d0746217e5b5525ff3e2.tar.gz stitch-db4e445ee0f29c1179b5d0746217e5b5525ff3e2.tar.bz2 stitch-db4e445ee0f29c1179b5d0746217e5b5525ff3e2.zip |
State handling done
Diffstat (limited to '')
-rw-r--r-- | lib/todos.ml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/todos.ml b/lib/todos.ml index 907538c..4e52cd4 100644 --- a/lib/todos.ml +++ b/lib/todos.ml @@ -8,7 +8,7 @@ type state = ; scroll : int ; content : (string * string) array ; content_pretty : string array - ; goto_headlines : unit -> unit + ; goto_headlines : state -> unit } let init ~goto_headlines ~content ~content_pretty = @@ -75,7 +75,7 @@ let rec render t ({ pos; scroll; content; content_pretty; goto_headlines } as st } in Input_screen.render t input_state - | `Key (`ASCII '1', []) -> goto_headlines () + | `Key (`ASCII '1', []) -> goto_headlines state | `Key (`ASCII 'j', []) | `Key (`ASCII 'N', [ `Ctrl ]) -> scroll_down () | `Key (`ASCII 'k', []) | `Key (`ASCII 'P', [ `Ctrl ]) -> scroll_up () | `Key (`ASCII 't', []) -> |