@@ -43,6 +43,8 @@ using StyledStrings: @styled_str
4343
4444const nmeta = 4 # number of metadata fields per block (threadid, taskid, cpu_cycle_clock, thread_sleeping)
4545
46+ const slash = Sys. iswindows () ? " \\ " : " /"
47+
4648# deprecated functions: use `getdict` instead
4749lookup (ip:: UInt ) = lookup (convert (Ptr{Cvoid}, ip))
4850
@@ -944,8 +946,8 @@ function print_flat(io::IO, lilist::Vector{StackFrame},
944946 Base. printstyled (io, pkgname, color= pkgcolor)
945947 file_trunc = ltruncate (file, max (1 , wfile))
946948 wpad = wfile - textwidth (pkgname)
947- if ! isempty (pkgname) && ! startswith (file_trunc, " / " )
948- Base. print (io, " / " )
949+ if ! isempty (pkgname) && ! startswith (file_trunc, slash )
950+ Base. print (io, slash )
949951 wpad -= 1
950952 end
951953 if isempty (path)
@@ -1048,7 +1050,7 @@ function tree_format(frames::Vector{<:StackFrameTree}, level::Int, cols::Int, ma
10481050 pkgcolor = get! (() -> popfirst! (Base. STACKTRACE_MODULECOLORS), PACKAGE_FIXEDCOLORS, pkgname)
10491051 remaining_path = ltruncate (filename, max (1 , widthfile - textwidth (pkgname) - 1 ))
10501052 linenum = li. line == - 1 ? " ?" : string (li. line)
1051- slash = (! isempty (pkgname) && ! startswith (remaining_path, " / " )) ? " / " : " "
1053+ slash = (! isempty (pkgname) && ! startswith (remaining_path, slash )) ? slash : " "
10521054 styled_path = styled " {$pkgcolor:$pkgname}$slash$remaining_path:$linenum"
10531055 rich_file = if isempty (path)
10541056 styled_path
0 commit comments