mirror of
https://github.com/charmbracelet/glow.git
synced 2026-08-22 16:14:17 +02:00
fix: sync viewport to show highlighted links
This commit is contained in:
parent
fe7986f6c8
commit
eab7252dd3
1 changed files with 6 additions and 0 deletions
|
|
@ -231,6 +231,9 @@ func (m pagerModel) update(msg tea.Msg) (pagerModel, tea.Cmd) {
|
|||
m.focusedLink = (m.focusedLink + 1) % len(m.links)
|
||||
}
|
||||
m.applyRenderedContent()
|
||||
if m.common != nil && m.common.cfg.HighPerformancePager {
|
||||
cmds = append(cmds, viewport.Sync(m.viewport))
|
||||
}
|
||||
cmds = append(cmds, m.showStatusMessage(pagerStatusMessage{"Open: " + m.links[m.focusedLink].ResolvedNote, false}))
|
||||
case keyShiftTab, "backtab":
|
||||
if len(m.links) == 0 {
|
||||
|
|
@ -246,6 +249,9 @@ func (m pagerModel) update(msg tea.Msg) (pagerModel, tea.Cmd) {
|
|||
}
|
||||
}
|
||||
m.applyRenderedContent()
|
||||
if m.common != nil && m.common.cfg.HighPerformancePager {
|
||||
cmds = append(cmds, viewport.Sync(m.viewport))
|
||||
}
|
||||
cmds = append(cmds, m.showStatusMessage(pagerStatusMessage{"Open: " + m.links[m.focusedLink].ResolvedNote, false}))
|
||||
|
||||
case keyEnter:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue