Skip to content

Add horizontal scrolling to the diff view - #156

Open
nikosavola wants to merge 1 commit into
dlvhdr:mainfrom
nikosavola:horizontal-scroll
Open

nikosavola wants to merge 1 commit into
dlvhdr:mainfrom
nikosavola:horizontal-scroll

Conversation

@nikosavola

Copy link
Copy Markdown
  • New ui.wrapLines config option (default true) and w keybinding to toggle line wrapping at runtime
  • With wrapping off, delta is invoked with --wrap-max-lines=0 so full untruncated lines are emitted, and ←/→ pan the view (a quarter of the viewport width per press, from either panel since the file tree only binds h/l); trackpad horizontal scroll works too
  • Side-by-side falls back to unified while wrapping is off, as delta truncates overflow in side-by-side mode; pressing s re-enables side-by-side and turns wrapping back on
  • Wrapped/unwrapped renders are cached separately, and switching files resets the pan to column 0
  • Footer diff stats no longer depend on the render-mode cache key, so they survive wrap/side-by-side toggles and theme changes (this was broken before for the s toggle as well)
  • Ignore stale async delta renders that finish after navigating to another node or toggling wrap/side-by-side, instead of clobbering the visible content

This change was AI-assisted, developed with GLM 5.3.

- new wrapLines config option and w keybinding to toggle line wrapping
- when wrapping is off, delta emits full untruncated lines and the
  viewport pans left/right with arrow keys and trackpad horizontal scroll
- side-by-side needs fixed columns, so it falls back to unified while
  wrapping is off

Co-Authored-By: GLM 5.3 <noreply@z.ai>
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.

1 participant