Skip to content

fix(diff): expand collapsed lines in side-by-side mode#156

Merged
agavra merged 1 commit intoagavra:mainfrom
saleemdjima:fix/expand-lines-split-mode
Feb 8, 2026
Merged

fix(diff): expand collapsed lines in side-by-side mode#156
agavra merged 1 commit intoagavra:mainfrom
saleemdjima:fix/expand-lines-split-mode

Conversation

@saleemdjima
Copy link
Copy Markdown
Contributor

Summary

Fixes #139: resolves the “expand (X lines)” functionality not working in side-by-side diff mode.

Changes

  • Call rebuild_annotations() in toggle_diff_view_mode() when switching modes
  • Add AnnotatedLine::SideBySideLine to properly represent paired deletion/addition rows
  • Introduce separate builders: build_unified_diff_annotations and build_side_by_side_annotations
  • Create a reusable push_comments function to reduce code duplication
  • Update line-counting logic to match the visual lines in side-by-side mode

Copy link
Copy Markdown
Owner

@agavra agavra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Thanks for this fix @saleemdjima will make it easier to use side-by-side mode.

@agavra agavra merged commit 025f6a7 into agavra:main Feb 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

show more lines doesn't work in split view

2 participants