diff --git a/pager/pager.go b/pager/pager.go index ca24fc6b2..f55201bd5 100644 --- a/pager/pager.go +++ b/pager/pager.go @@ -76,7 +76,7 @@ func (m *model) ProcessText(msg tea.WindowSizeMsg) { text.WriteString(m.lineNumberStyle.Render(fmt.Sprintf("%4d │ ", i+1))) } for m.softWrap && lipgloss.Width(line) > m.maxWidth { - truncatedLine := truncate.String(line, uint(m.maxWidth)) + truncatedLine := truncate.String(line, uint(m.maxWidth)) //nolint: gosec text.WriteString(textStyle.Render(truncatedLine)) text.WriteString("\n") if m.showLineNumbers { @@ -84,7 +84,7 @@ func (m *model) ProcessText(msg tea.WindowSizeMsg) { } line = strings.Replace(line, truncatedLine, "", 1) } - text.WriteString(textStyle.Render(truncate.String(line, uint(m.maxWidth)))) + text.WriteString(textStyle.Render(truncate.String(line, uint(m.maxWidth)))) //nolint: gosec text.WriteString("\n") } diff --git a/pager/search.go b/pager/search.go index b112d7dea..e32260da5 100644 --- a/pager/search.go +++ b/pager/search.go @@ -151,12 +151,12 @@ func softWrapEm(str string, maxWidth int, softWrap bool) string { var text strings.Builder for _, line := range strings.Split(str, "\n") { for softWrap && lipgloss.Width(line) > maxWidth { - truncatedLine := truncate.String(line, uint(maxWidth)) + truncatedLine := truncate.String(line, uint(maxWidth)) //nolint: gosec text.WriteString(truncatedLine) text.WriteString("\n") line = strings.Replace(line, truncatedLine, "", 1) } - text.WriteString(truncate.String(line, uint(maxWidth))) + text.WriteString(truncate.String(line, uint(maxWidth))) //nolint: gosec text.WriteString("\n") }