diff options
author | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-05-17 12:17:35 +0200 |
---|---|---|
committer | Pierre-Marie Pédrot <pierre-marie.pedrot@inria.fr> | 2017-05-17 12:17:35 +0200 |
commit | 8beb75435a3ffd3c91ad08cd8b2ca42fb2bb5896 (patch) | |
tree | 40fafe5a55bff8705cbae1c05f3119b4165c98c7 /toplevel/vernac.ml | |
parent | e09a8cf6a2db97b75796a54296683fe12977d018 (diff) | |
parent | c64a28ee5a6643449f7c77ed7b8737e8f01ede52 (diff) |
Merge branch 'v8.6'
Diffstat (limited to 'toplevel/vernac.ml')
-rw-r--r-- | toplevel/vernac.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/toplevel/vernac.ml b/toplevel/vernac.ml index 4fca4ea18..eaf685b18 100644 --- a/toplevel/vernac.ml +++ b/toplevel/vernac.ml @@ -79,7 +79,9 @@ let pr_new_syntax po loc chan_beautify ocom = and a glimpse of the executed command *) let pp_cmd_header loc com = - let shorten s = try (String.sub s 0 30)^"..." with _ -> s in + let shorten s = + if Unicode.utf8_length s > 33 then (Unicode.utf8_sub s 0 30) ^ "..." else s + in let noblank s = String.map (fun c -> match c with | ' ' | '\n' | '\t' | '\r' -> '~' |