fix(tui): wrap long artifact lines in viewer instead of truncating
Artifact content wider than the modal was silently cut off. Lines are now hard-wrapped at rune boundaries to the modal content width, and scroll clamping uses the wrapped line count so the last page stays reachable.
This commit is contained in:
@@ -401,7 +401,8 @@ func (m Model) handleOverlayKey(k tea.KeyMsg) (tea.Model, tea.Cmd) {
|
||||
m.artifactScroll--
|
||||
}
|
||||
case k.Type == tea.KeyPgDown:
|
||||
if m.artifactScroll < m.artifactContentMaxScroll() {
|
||||
contentW := m.modalWidth() - 6
|
||||
if m.artifactScroll < m.artifactContentMaxScroll(contentW) {
|
||||
m.artifactScroll++
|
||||
}
|
||||
case runeIs(k, "v"):
|
||||
|
||||
Reference in New Issue
Block a user