diff options
-rw-r--r-- | lib/pp_control.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pp_control.ml b/lib/pp_control.ml index 7fe4e0f52..969c1550e 100644 --- a/lib/pp_control.ml +++ b/lib/pp_control.ml @@ -85,7 +85,9 @@ let set_margin v = Format.pp_set_margin Format.str_formatter v; Format.pp_set_margin !std_ft v; Format.pp_set_margin !deep_ft v; - let m = 64 * v / 100 in (* Heuristic, based on usage *) + (* Heuristic, based on usage: the column on the right of max_indent + column is 20% of width, capped to 30 characters *) + let m = max (64 * v / 100) (v-30) in Format.pp_set_max_indent Format.str_formatter m; Format.pp_set_max_indent !std_ft m; Format.pp_set_max_indent !deep_ft m |