Merge pull request 'Alternative way of rendering when bookmarks are not open' (#167) from rendering-fix into release-2.3.1

Since this has been reviewed as functional I am merging into the release branch. There will be another opportunity to review, if need be, for the release branch when a PR is made into `develop`.
tls-timeout
Sloom Sloum Sluom IV 3 years ago
commit b8721366a2

@ -122,15 +122,11 @@ func (c *client) Draw() {
} else {
for i := 0; i < c.Height-3; i++ {
if i < len(pageContent) {
extra := 0
escapes := re.FindAllString(pageContent[i], -1)
for _, esc := range escapes {
extra += len(esc)
}
screen.WriteString(fmt.Sprintf("%-*.*s", c.Width+extra, c.Width+extra, pageContent[i]))
screen.WriteString(pageContent[i])
screen.WriteString("\033[0K")
screen.WriteString("\n")
} else {
screen.WriteString(fmt.Sprintf("%-*.*s", c.Width, c.Width, " "))
screen.WriteString("\033[0K")
screen.WriteString("\n")
}
}

Loading…
Cancel
Save