Files
tty7/docs/git/diffs.mdx
l0ng-ai c0104d1f05 feat(search): replace the command palette with tabbed Search Everywhere
The palette was one flat list that every new kind of row had to be squeezed
into: tabs and SSH hosts rode along as "Switch to Tab: …" and "SSH: …"
commands, and the only way to narrow to one kind was a magic seed word.

Search Everywhere splits it into sources behind one trait — All, Actions,
Terminals, Hosts — each with its own empty-query layout and ranking. The All
tab shows each source's top rows, ordered by best match, with a row that
opens the full tab. Tab / Shift-Tab walk the tabs and keep the query.

- Terminals lists every open tab of every workspace (reusing the switcher's
  tab rows) and jumps to it wherever it lives, plus the shells and agents.
- Hosts replaces the separate "Add Connection" input: a typed address or
  full `ssh …` line offers to connect.
- Fixes Return doing nothing after a search that found nothing, or when the
  search opens pre-filtered: gpui-component re-picks the row from a stale
  frame; the delegate now re-arms the first row.
- Fixes `ssh -p 2222 me@box` being offered as a quick-connect address with
  user `ssh -p 2222 me`.

The keymap action stays `TogglePalette` so custom bindings keep working.
2026-09-26 12:35:23 +02:00

52 lines
2.0 KiB
Plaintext
Raw Permalink 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.
## Turning the sidebar shortcut off
If you would rather the sidebar's counts not be clickable, turn off **Settings →
Window & Tabs → Open diff preview from sidebar counts**
(`sidebar_diff_preview: false`). The branch and counts stay on the row; they
just stop opening the overlay.