mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-26 10:04:17 +02:00
Respect high performance flag
This commit is contained in:
parent
b2df0cae8f
commit
232a9919c2
1 changed files with 6 additions and 2 deletions
|
|
@ -199,14 +199,18 @@ func pagerUpdate(msg tea.Msg, m pagerModel) (pagerModel, tea.Cmd) {
|
|||
return m, textinput.Blink(m.textInput)
|
||||
case "?":
|
||||
m.toggleHeight()
|
||||
cmds = append(cmds, viewport.Sync(m.viewport))
|
||||
if m.viewport.HighPerformanceRendering {
|
||||
cmds = append(cmds, viewport.Sync(m.viewport))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Glow has rendered the content
|
||||
case contentRenderedMsg:
|
||||
m.setContent(string(msg))
|
||||
cmds = append(cmds, viewport.Sync(m.viewport))
|
||||
if m.viewport.HighPerformanceRendering {
|
||||
cmds = append(cmds, viewport.Sync(m.viewport))
|
||||
}
|
||||
|
||||
// We've reveived terminal dimensions, either for the first time or
|
||||
// after a resize
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue