Files
tty7/docs/git/diffs.mdx
T
l0ng-ai b063ba97a0 refactor(settings): fold Window & Tabs into General, drop two settings (#982)
The Window & Tabs page is gone. Its three remaining tab settings (new tab
position, tab bar position, auto grouping) are a Tabs group on General,
below Startup & restore, so the nav has seven sections.

Removed outright:
- SSH tab title (`ssh_tab_title`, #726, unreleased). The sidebar already
  groups SSH tabs under their host, and renaming a tab pins its name.
- Open diff preview from sidebar counts (`sidebar_diff_preview`, #247).
  The sidebar counts and the Info panel's changes row always open the
  diff overlay; the large-tree stall it worked around is bounded. An old
  config.json that still carries either key loads as before.

The now-unused window settings icon goes with the page.
2026-09-27 19:11:45 +08:00

45 lines
1.7 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Diffs"
description: "The diff overlay: side-by-side or unified, from the sidebar or the panel."
---
## Opening one
| From | How |
|---|---|
| The sidebar | Click a row's `+N −M` counts |
| Source Control | **Open Changes** on a file, or click the row |
| History | Click a file inside a commit's detail view |
A diff docks beside the terminal, in the same column an open file uses, so the
pane you were reading stays on screen. <kbd>Esc</kbd> closes it, and its header
right-clicks to a menu that fills the window with it if you prefer that —
[more about the column →](/window/side-panel#where-it-opens)
<Frame caption="The diff, side by side, across every changed file">
<img src="/images/diff-overlay.webp" alt="The tty7 diff overlay" />
</Frame>
## Side-by-side or unified
**Toggle Unified / Side-by-Side Diff** in Search Everywhere switches between
the two. The choice is global — one setting for every diff, the same call VS
Code's `diffEditor.renderSideBySide` makes — and persists as `diff_view` in
`config.json`.
## What it shows
- Every changed file, with its status and `+N −M`
- **Untracked files** as a preview of their contents, up to 4 MB — past that the
card says the read failed rather than showing a silently cut-off file
- A commit's files, when the diff came from the history
Two limits keep a huge diff from becoming a huge wait:
| Limit | Value | What happens |
|---|---|---|
| Files rendered | 300 | *"… and N more changed files — run git diff in the terminal to see them."* |
| Lines before auto-collapse | 400 per file | Big files start collapsed; expand the ones you care about |
Both are stated in the overlay when they apply — nothing is dropped silently.