Merge pull request #23 from oug-t/fix/long-line

fix: reserve 2 lines for view
This commit is contained in:
Tommy Guo 2026-02-12 17:54:09 -05:00 committed by GitHub
commit ba956170e9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -498,8 +498,8 @@ func (m Model) View() string {
} else {
var renderedDiff strings.Builder
// Reserve 1 line for the file header
viewportHeight := m.diffViewport.Height - 1
// Reserve 2 line for the file header
viewportHeight := m.diffViewport.Height - 2
start := m.diffViewport.YOffset
end := start + viewportHeight
if end > len(m.diffLines) {