@@ -859,7 +859,6 @@ function tree_format(frames::Vector{<:StackFrameTree}, level::Int, cols::Int, ma
859859 ndigline = ndigits (maximum (frame. frame. line for frame in frames)) + 6
860860 ntext = max (30 , cols - ndigoverhead - nindent - ndigcounts - ndigline - 6 )
861861 widthfile = 2 * ntext÷ 5 # min 12
862- widthfunc = 3 * ntext÷ 5 # min 18
863862 strs = Vector {String} (undef, length (frames))
864863 showextra = false
865864 if level > nindent
@@ -901,11 +900,12 @@ function tree_format(frames::Vector{<:StackFrameTree}, level::Int, cols::Int, ma
901900 " :" ,
902901 li. line == - 1 ? " ?" : string (li. line),
903902 " ; " ,
904- ltruncto ( fname, widthfunc) )
903+ fname)
905904 end
906905 else
907906 strs[i] = string (stroverhead, " ╎" , base, strcount, " [unknown stackframe]" )
908907 end
908+ strs[i] = ltruncto (strs[i], cols)
909909 end
910910 return strs
911911end
@@ -1161,17 +1161,17 @@ end
11611161
11621162# Utilities
11631163function rtruncto (str:: String , w:: Int )
1164- if length (str) <= w
1164+ if textwidth (str) <= w
11651165 return str
11661166 else
1167- return string (" ... " , str[prevind (str, end , w- 4 ): end ])
1167+ return string (" … " , str[prevind (str, end , w- 2 ): end ])
11681168 end
11691169end
11701170function ltruncto (str:: String , w:: Int )
1171- if length (str) <= w
1171+ if textwidth (str) <= w
11721172 return str
11731173 else
1174- return string (str[1 : nextind (str, 1 , w- 4 )], " ... " )
1174+ return string (str[1 : nextind (str, 1 , w- 2 )], " … " )
11751175 end
11761176end
11771177
0 commit comments