background code checker for golang

view: fix column indicator calculation

+6 -1
+6 -1
view.go
··· 89 89 90 90 b.WriteString("\n") 91 91 b.WriteString(style.passiveLineNr.Render(sign.passiveIndent)) 92 - b.WriteString(style.activeLineNr.Width(col + 3*tabCount + len(msg.Location.Line)).Align(lipgloss.Right).Render("^")) 92 + 93 + leftPadding := col + // current column to place the pointer at 94 + 3*tabCount + // if the line has tabs, we convert to spaces and offset 95 + len(msg.Location.Line) + // we always print line-numbers, so offset by that too 96 + 1 // there is a single space between line-number and line content 97 + b.WriteString(style.activeLineNr.Width(leftPadding).Align(lipgloss.Right).Render("^")) 93 98 } 94 99 b.WriteString("\n") 95 100 }