mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-22 16:14:17 +02:00
Fix a crash when opening pager help in very narrow windows
This commit is contained in:
parent
1280ed3bbe
commit
8370f7441e
1 changed files with 1 additions and 1 deletions
|
|
@ -310,7 +310,7 @@ func pagerHelpView(width int) (s string) {
|
|||
lines := strings.Split(s, "\n")
|
||||
for i := 0; i < len(lines); i++ {
|
||||
l := runewidth.StringWidth(lines[i])
|
||||
n := width - l
|
||||
n := max(width-l, 0)
|
||||
lines[i] += strings.Repeat(" ", n)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue