From 737f663374123f322a1fe5d0f52e93042801b78c Mon Sep 17 00:00:00 2001 From: malc Date: Thu, 31 May 2018 17:44:25 +0300 Subject: [PATCH] unit is not good enough for utils --- main.ml | 6 +++--- utils.ml | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/main.ml b/main.ml index c583d69..56ac8d7 100644 --- a/main.ml +++ b/main.ml @@ -2850,12 +2850,12 @@ let enterannotmode opaque slinkindex = let rec split accu b i = let p = b+i in if p = String.length s - then (String.sub s b (p-b), unit) :: accu + then (String.sub s b (p-b), fun () -> ()) :: accu else if (i > 70 && s.[p] = ' ') || s.[p] = '\r' || s.[p] = '\n' then let ss = if i = 0 then E.s else String.sub s b i in - split ((ss, unit)::accu) (p+1) 0 + split ((ss, fun () -> ())::accu) (p+1) 0 else split accu b (i+1) in let cleanup () = @@ -2901,7 +2901,7 @@ let enterannotmode opaque slinkindex = ( "[Copy]", fun () -> selstring conf.selcmd m_text) :: ("[Delete]", dele) :: ("[Edit]", edit conf.annotinline) - :: (E.s, unit) + :: (E.s, fun () -> ()) :: split [] 0 0 |> List.rev |> Array.of_list initializer diff --git a/utils.ml b/utils.ml index 2a7de54..1e51a45 100644 --- a/utils.ml +++ b/utils.ml @@ -168,8 +168,6 @@ module Re = struct let whitespace = Str.regexp "[ \t]";; end;; -let unit () = ();; - let addchar s c = let b = Buffer.create (String.length s + 1) in Buffer.add_string b s; -- 2.11.4.GIT