Skip to content

Commit dfb73a4

Browse files
authored
Fix side-by-side toggle for directory nodes (#72)
## Summary - Toggling side-by-side mode on a directory node did nothing because `SetSideBySide` called `diffFile` directly, which returns nil when `m.file` is nil - Now uses `m.diff()` which dispatches to `diffFile` or `diffDir` as appropriate
1 parent 297d8d0 commit dfb73a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/ui/panes/diffviewer/diffviewer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func (m *Model) GoToTop() {
211211
// SetSideBySide updates the diff view mode and re-renders.
212212
func (m *Model) SetSideBySide(sideBySide bool) tea.Cmd {
213213
m.sideBySide = sideBySide
214-
return diffFile(m.file, m.Width, m.sideBySide)
214+
return m.diff()
215215
}
216216

217217
// ScrollUp scrolls the viewport up by the given number of lines.

0 commit comments

Comments
 (0)