@@ -43,6 +43,8 @@ using StyledStrings: @styled_str
43
43
44
44
const nmeta = 4 # number of metadata fields per block (threadid, taskid, cpu_cycle_clock, thread_sleeping)
45
45
46
+ const slash = Sys. iswindows () ? " \\ " : " /"
47
+
46
48
# deprecated functions: use `getdict` instead
47
49
lookup (ip:: UInt ) = lookup (convert (Ptr{Cvoid}, ip))
48
50
@@ -944,8 +946,8 @@ function print_flat(io::IO, lilist::Vector{StackFrame},
944
946
Base. printstyled (io, pkgname, color= pkgcolor)
945
947
file_trunc = ltruncate (file, max (1 , wfile))
946
948
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 )
949
951
wpad -= 1
950
952
end
951
953
if isempty (path)
@@ -1048,8 +1050,8 @@ function tree_format(frames::Vector{<:StackFrameTree}, level::Int, cols::Int, ma
1048
1050
pkgcolor = get! (() -> popfirst! (Base. STACKTRACE_MODULECOLORS), PACKAGE_FIXEDCOLORS, pkgname)
1049
1051
remaining_path = ltruncate (filename, max (1 , widthfile - textwidth (pkgname) - 1 ))
1050
1052
linenum = li. line == - 1 ? " ?" : string (li. line)
1051
- slash = (! isempty (pkgname) && ! startswith (remaining_path, " / " )) ? " / " : " "
1052
- styled_path = styled " {$pkgcolor:$pkgname}$slash $remaining_path:$linenum"
1053
+ _slash = (! isempty (pkgname) && ! startswith (remaining_path, slash )) ? slash : " "
1054
+ styled_path = styled " {$pkgcolor:$pkgname}$(_slash) $remaining_path:$linenum"
1053
1055
rich_file = if isempty (path)
1054
1056
styled_path
1055
1057
else
0 commit comments