Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed Mar 29, 2024
1 parent 5039d19 commit dc29ba2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,11 @@ func main() {
}

if autoWidth {
longestLine := lipgloss.Width(strings.ReplaceAll(strippedInput, "\t", " "))
tabWidth := 4
if isAnsi {
tabWidth = 6
}
longestLine := lipgloss.Width(strings.ReplaceAll(strippedInput, "\t", strings.Repeat(" ", tabWidth)))
terminalWidth = float64(longestLine+1) * (config.Font.Size / fontHeightToWidthRatio)
terminalWidth *= scale
terminalWidth += hPadding
Expand Down

0 comments on commit dc29ba2

Please sign in to comment.