Skip to content

Commit 4e7466c

Browse files
committed
Replace tabs for proper alignment when displaying positions
1 parent 04580dc commit 4e7466c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/scala/inox/Reporter.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ class DefaultReporter(debugSections: Set[DebugSection]) extends Reporter(debugSe
204204
def printLineContent(pos: Position, asciiOnly: Boolean): Unit = {
205205
getLine(pos) match {
206206
case Some(line) =>
207-
println(blankPrefix+line)
207+
// Scala positions probably assume 1 tab = 8 spaces, so we replaces tabs
208+
// for the carret (^) computed below to be aligned
209+
println(blankPrefix+line.replace("\t", " " * 8))
208210
pos match {
209211
case rp: RangePosition =>
210212
val bp = rp.focusBegin

0 commit comments

Comments
 (0)