fix: ignore newlines when printing with ruler file (#2319)
* fix: ignore newlines when printing with ruler file * Update `CHANGELOG.md`
This commit is contained in:
1 parent
9dac520497
commit
d607bdc04e
2 files changed
+2
-2
No files matched your search
@@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- A bug where sixel images fail to display when scrolling back and forth is now fixed (#2301).
|
- 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)
|
## [r40](https://github.com/gokcehan/lf/releases/tag/r40)
|
||||||
|
|
||||||
|
|||||||
@@ -76,8 +76,7 @@ func renderRuler(ruler *template.Template, data rulerData, width int) (string, s
|
|||||||
return "", "", err
|
return "", "", err
|
||||||
}
|
}
|
||||||
|
|
||||||
s := strings.TrimSuffix(b.String(), "\n")
|
s := strings.ReplaceAll(b.String(), "\n", "")
|
||||||
s = strings.ReplaceAll(s, "\n", "\033[0;7m\\n\033[0m")
|
|
||||||
sections := strings.Split(s, "\x1f")
|
sections := strings.Split(s, "\x1f")
|
||||||
|
|
||||||
if len(sections) == 1 {
|
if len(sections) == 1 {
|
||||||
|
|||||||
Reference in new issue
Block a user