aboutsummaryrefslogtreecommitdiff
path: root/lib/todos.ml
diff options
context:
space:
mode:
authorMarc Coquand <marc@mccd.space>2024-05-15 11:17:48 -0500
committerMarc Coquand <marc@mccd.space>2024-05-15 11:17:48 -0500
commitdb4e445ee0f29c1179b5d0746217e5b5525ff3e2 (patch)
tree1f30d6f7d3305d7f8becbed3297b033899d9251f /lib/todos.ml
parent47be0ea3eeb774102f02b5f85ee974afe6a8170e (diff)
downloadstitch-db4e445ee0f29c1179b5d0746217e5b5525ff3e2.tar.gz
stitch-db4e445ee0f29c1179b5d0746217e5b5525ff3e2.tar.bz2
stitch-db4e445ee0f29c1179b5d0746217e5b5525ff3e2.zip
State handling done
Diffstat (limited to 'lib/todos.ml')
-rw-r--r--lib/todos.ml4
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', []) ->