aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/io_lib_pretty.erl
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2018-06-11 12:38:41 +0200
committerHans Bolinder <[email protected]>2018-06-11 12:38:41 +0200
commitc2d0170c32402a7ddb6657be72f5bf5786fa298b (patch)
treea35b4e25c729b4c19accb1b21594dbb65f48f83b /lib/stdlib/src/io_lib_pretty.erl
parentcf2ad431487cb533aac2854843aa61b8e1e5af62 (diff)
parent7a5ae72a5f46059d8c862a4e5964b4799d1fda4b (diff)
downloadotp-c2d0170c32402a7ddb6657be72f5bf5786fa298b.tar.gz
otp-c2d0170c32402a7ddb6657be72f5bf5786fa298b.tar.bz2
otp-c2d0170c32402a7ddb6657be72f5bf5786fa298b.zip
Merge branch 'hasse/stdlib/pP_with_no_line_breaks/OTP-15103/ERL-607'
* hasse/stdlib/pP_with_no_line_breaks/OTP-15103/ERL-607: kernel: Use ~0p debugger: Use ~0p common_test: Use ~0p stdlib: Make pP insert no line breaks with field width zero
Diffstat (limited to 'lib/stdlib/src/io_lib_pretty.erl')
-rw-r--r--lib/stdlib/src/io_lib_pretty.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/stdlib/src/io_lib_pretty.erl b/lib/stdlib/src/io_lib_pretty.erl
index 3d5a979b3e..dca1b37ef3 100644
--- a/lib/stdlib/src/io_lib_pretty.erl
+++ b/lib/stdlib/src/io_lib_pretty.erl
@@ -131,6 +131,8 @@ print(Term, Col, Ll, D, M0, T, RecDefFun, Enc, Str) when is_tuple(Term);
%% use Len as CHAR_MAX if M0 = -1
M = max_cs(M0, Len),
if
+ Ll =:= 0 ->
+ write(If);
Len < Ll - Col, Len =< M ->
%% write the whole thing on a single line when there is room
write(If);