diff --git a/src/getopt.erl b/src/getopt.erl index 0e4f86a..ed23884 100644 --- a/src/getopt.erl +++ b/src/getopt.erl @@ -812,10 +812,8 @@ get_env_var(Prefix, Suffix, []) -> -spec line_length() -> non_neg_integer(). line_length() -> case io:columns() of - {ok, Columns} when Columns >= ?LINE_LENGTH -> - Columns - 5; - {ok, Columns} -> - Columns; + {ok, Columns} when Columns < ?LINE_LENGTH -> + Columns - 1; _ -> ?LINE_LENGTH end.