summaryrefslogtreecommitdiff
path: root/script.it/script_event/complete_path.ml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2021-05-25 11:08:00 +0200
committerSébastien Dailly <sebastien@dailly.me>2022-02-07 16:22:43 +0100
commit6a75fb043ed30389fff1ce97fe20ee56b1c95066 (patch)
tree20e0c2cb39dffcf85449e0b810d773909c405a0e /script.it/script_event/complete_path.ml
parent90f1f73f08b2d9231b2ee029b9e39dd570e36f36 (diff)
Update script.it project
Diffstat (limited to 'script.it/script_event/complete_path.ml')
-rwxr-xr-xscript.it/script_event/complete_path.ml14
1 files changed, 14 insertions, 0 deletions
diff --git a/script.it/script_event/complete_path.ml b/script.it/script_event/complete_path.ml
new file mode 100755
index 0000000..99dd6ae
--- /dev/null
+++ b/script.it/script_event/complete_path.ml
@@ -0,0 +1,14 @@
+open StdLabels
+module State = Script_state.State
+
+type t = Outline.t
+
+let update newPath state =
+ let paths = List.map
+ state.State.paths
+ ~f:(fun line ->
+ match Outline.(newPath.id = line.id) with
+ | true -> newPath
+ | false -> line) in
+ { state with paths }
+