diff --git a/CHANGELOG.md b/CHANGELOG.md index 1eb25787..29a1b706 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), ### Fixed - A bug where sixel images fail to display when scrolling back and forth is now fixed (#2301). +- Newline characters are now ignored when drawing the ruler with the `ruler` file configured (#2319). ## [r40](https://github.com/gokcehan/lf/releases/tag/r40) diff --git a/ruler.go b/ruler.go index 4c857071..69239754 100644 --- a/ruler.go +++ b/ruler.go @@ -76,8 +76,7 @@ func renderRuler(ruler *template.Template, data rulerData, width int) (string, s return "", "", err } - s := strings.TrimSuffix(b.String(), "\n") - s = strings.ReplaceAll(s, "\n", "\033[0;7m\\n\033[0m") + s := strings.ReplaceAll(b.String(), "\n", "") sections := strings.Split(s, "\x1f") if len(sections) == 1 {