Skip to content

Commit 3e3f159

Browse files
committed
Use nonbreaking spaces for alignment of stack frames
1 parent a57ac0c commit 3e3f159

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/core/digression.StackTrace.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,15 @@ object StackTrace:
227227
case (msg, frame) =>
228228
val obj = frame.method.className.s.endsWith("#")
229229
val drop = if obj then 1 else 0
230-
val file = (" "*(fileWidth - frame.file.s.length))+frame.file
230+
val file = ("\u00a0"*(fileWidth - frame.file.s.length))+frame.file
231231
val dot = if obj then ".".tt else "#".tt
232232
val className = frame.method.className.s.dropRight(drop)
233-
val classPad = (" "*(classWidth - className.length)).tt
233+
val classPad = ("\u00a0"*(classWidth - className.length)).tt
234234
val method = frame.method.method
235-
val methodPad = (" "*(methodWidth - method.s.length)).tt
235+
val methodPad = ("\u00a0"*(methodWidth - method.s.length)).tt
236236
val line = frame.line.let(_.toString.tt).or("?".tt)
237237

238-
s"$msg\n\n at $classPad$className$dot$method$methodPad $file:$line".tt
238+
s"$msg\n\n\u00a0\u00a0at\u00a0$classPad$className$dot$method$methodPad\u00a0$file:$line".tt
239239

240240
Message:
241241
stack.cause.lay(root): cause =>

0 commit comments

Comments
 (0)