Commit Graph
100 Commits
Author SHA1 Message Date
Stefan Haller df171722cb Make .go files have LF line endings on Windows
Since gofumpt expects and emits LF even on Windows, this makes it easier for
agents to gofumpt their files.
2026-06-16 16:21:13 +02:00
Stefan Haller 061665726e Fix Windows linter errors
Apparently we don't check Windows-only code for linter errors on CI.
2026-06-16 16:21:13 +02:00
Stefan HallerandGitHub 8a7bef0975 Improve cycling through multiple pagers (#5678)
Lazygit lets you configure multiple pagers and switch between them with
the `|` key. The changes in this PR improve this for the case that you
have more than two.

- **You can see which pager you switched to.** The notification used to
just say "pager 2 of 3"; now it shows the pager's name, so you no longer
have to remember the order to know where you've landed.

- **You can name your pagers.** By default the name is taken from the
pager command, but you can set your own name in the config. This helps
when two entries run the same command with different options (for
example plain `delta` and `delta --side-by-side`).

- **You can cycle backwards.** Alongside `|`, which moves to the next
pager, the new `\` key moves to the previous one — so you can step back
instead of going all the way around the list to return to one you just
passed. This is especially useful when you have two pagers that you
alternate between often (e.g. `delta` and `delta --side-by-side`), but
also have several others in the list that you use only occasionally.

- **Invalid pager setups are caught early.** If an entry combines
options that can't be used together, lazygit now tells you about it on
startup instead of silently producing a broken diff.
2026-06-07 16:00:08 +02:00
Stefan HallerandClaude Opus 4.8 8534a05a2e Allow cycling pagers in reverse
With more than a couple of pagers, having to cycle forward through all
of them to reach the previous one (or to back out of an accidental press
of `|`) is tedious. Add a second binding that cycles backward.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 15:51:57 +02:00
Stefan HallerandClaude Opus 4.8 5a4247b234 Extract onPagerChanged helper from cyclePagers
A reverse-cycle handler is about to need the same re-render-and-toast
logic. Pull it out first so the behavior change that follows only has to
swap the cycle direction.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 15:51:57 +02:00
Stefan HallerandClaude Opus 4.8 6316094d58 Show pager name in the cycle-pager toast, and let users name pagers
When cycling pagers, "Selected pager 2 of 3" gives no clue which pager
you landed on; with several configured you have to remember the order.
Include the pager's name in the toast instead.

The name is normally derived from the first word of the pager command,
but that isn't always enough: two entries can share a command but differ
in options (e.g. "delta" and "delta --side-by-side"), and an entry may
have no command at all (the default entry, or when using
useExternalDiffGitConfig). So add an optional `name` field that
overrides the derived name.

The message was also hardcoded in English; localize it while we're here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 15:51:57 +02:00
Stefan HallerandClaude Opus 4.8 81420ce362 Reject pager entries that combine multiple diff mechanisms
A pager (GIT_PAGER) formats the diff git produces, while
externalDiffCommand and useExternalDiffGitConfig change how git produces
the diff in the first place. They are different pipeline stages, not
alternatives, so combining them on one entry just pipes one through the
other and produces garbled output (e.g. delta trying to parse
difftastic's side-by-side output as a unified diff). The two external
mechanisms likewise conflict, with the explicit command silently
shadowing the git config one. Treat all three as mutually exclusive and
reject configs that set more than one on the same entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 15:51:56 +02:00
Stefan Haller 9739a43355 Terminate tooltip text with a full stop
This is our general convention for tooltips, it was just forgotten here.
2026-06-07 15:51:56 +02:00
Stefan Haller badb089a86 Add a "just check" command 2026-06-07 15:51:56 +02:00
Stefan HallerandGitHub 68f3bcf53b Fix unstaging a submodule with dirty content (#5666)
Staging and unstaging submodules didn't work properly when the submodule
had uncommitted changes of its own (modified or untracked files inside
it). This PR fixes a few related problems:

- **Unstaging a submodule that has both a new commit and uncommitted
changes now works.** Previously, staging such a submodule left it
half-staged, and from there the stage key would only ever try to
re-stage it — there was no way to unstage it again. Now the stage key
toggles it back to unstaged as expected.

- **Trying to stage a submodule that has nothing stageable now explains
why.** When a submodule's only changes are uncommitted content inside it
(with no new commit), there's nothing the parent repository can stage.
Instead of the keypress silently doing nothing (except briefly flashing
the status to staged and then back to unstaged), lazygit now shows an
error explaining that you need to commit inside the submodule first.

- **The stage key (space) and the stage-all key (`a`) now behave
consistently.** All of the above applies equally whether you act on the
submodule directly or use "stage all", and "stage all" no longer gets
stuck or behaves differently from the stage key just because a submodule
with uncommitted changes is present in the list.

Fixes #3641.
2026-06-04 09:16:49 +02:00
Stefan HallerandClaude Opus 4.8 785c8a712c Explain when a submodule has nothing stageable
A submodule that only has dirty or untracked content (no new commit) can't
be staged from the parent repo, but it still shows up as having unstaged
changes. Pressing stage on it therefore briefly flashed as staged and then
reverted, without explaining why nothing was staged.

Detect this case (via `git submodule status`, where a '+' prefix marks a
stageable commit change) in the shared stage/unstage decision: if the only
thing that looks stageable is such a submodule, don't try to stage it.
Instead unstage if there's anything staged to unstage, so the toggle stays
symmetric; otherwise show an error explaining that there's nothing to stage.

Because the decision is shared, this covers both the stage (space) and
stage-all (a) keybindings.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 09:12:09 +02:00
Stefan HallerandClaude Opus 4.8 8b5cfb0425 Optimistically render unstaging a dirty submodule
This map only feeds the optimistic rendering that makes staging feel
instant; it doesn't affect the eventual status, which git reports after
the refresh. The "MM" entry can never be reached for a regular file: a
file at "MM" has stageable unstaged changes, so pressing space stages it
rather than unstaging, and the unstage path is where this map is used. The
only thing that reaches the unstage path at "MM" is a submodule whose
commit is staged on top of dirty content, so this entry exists purely to
update that submodule instantly instead of waiting for the next git
status.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 09:12:09 +02:00
Stefan HallerandClaude Opus 4.8 c46c874442 Also verify stage-all can unstage a dirty submodule
Before the staging decision was unified, the stage (space) and stage-all
(a) keybindings each made their own decision, so a fix to one wouldn't
reach the other. Extend the test to drive the submodule through stage-all
as well, guarding against that asymmetry coming back.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 09:12:09 +02:00
Stefan HallerandClaude Opus 4.8 3f0a7512f8 Fix unstaging a submodule with dirty content
The stage/unstage toggle decides what to do based on whether a node has
unstaged changes: if it does, it stages; otherwise it unstages. For a
submodule this breaks down, because dirty or untracked content inside the
submodule always reports as an unstaged change in the parent repo but can
never be staged from there. Once such a submodule's commit pointer is
staged it sits at "MM", and every subsequent press keeps trying to stage
the unstageable dirty content, so it can never be unstaged.

Treat a submodule's unstaged change as stageable only when its commit
isn't already staged, so that a staged submodule unstages on the next
press regardless of leftover dirty content. Because the decision is now
shared by press and stage-all, this fixes both at once.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 09:12:09 +02:00
Stefan HallerandClaude Opus 4.8 66fe18dd59 Unify the stage/unstage decision for press and stage-all
pressWithLock (acting on the selection) and toggleStagedAllWithLock (acting
on the whole tree) each independently decided whether to stage or unstage,
ran the optimistic update, and logged the action. That duplicated decision
has already drifted: the tracked-files filter was added to press months
before it was applied to stage-all, and fixes to one have repeatedly had to
be chased into the other.

Extract that shared decision into toggleStaged, leaving each caller to
supply only the git commands it runs (per-path for the selection, bulk
add -A / reset for the whole tree — the latter is required because the tree
root node has an empty path, so a per-path stage wouldn't work). This is a
pure refactor: the two callers' decisions were already equivalent, so
behavior is unchanged. It exists so the next change to the staging logic
only has to be made once.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 09:12:09 +02:00
Stefan HallerandClaude Opus 4.8 c588c5507c Add a test demonstrating that you can't unstage a dirty submodule
When a submodule has both a new commit (which the parent repo can stage)
and dirty working-tree content (which it can't), staging it lands on a
"MM" status. Pressing space again should unstage it, but instead it tries
to stage the dirty content over and over, so you can never get back to an
unstaged state.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-04 09:12:09 +02:00
Stefan HallerandGitHub 38526c9ec4 Add direnv support (#5660)
Supports loading direnv's environment files (`.envrc`) when switching
repos or worktrees, or when entering or exiting submodules.

There's no configuration for this; the functionality is automatically
enabled when direnv is installed.

Closes #3653.
2026-06-04 09:10:50 +02:00
Stefan HallerandClaude Opus 4.7 b76c1072ff Offer direnv .envrc approval from inside lazygit
When a user switches into a repo whose .envrc hasn't been approved with
`direnv allow`, the previous behavior was to drop a "blocked" error
popup and leave the user to fix it externally. That meant opening a
terminal, running `direnv allow`, and then either restarting lazygit or
switching repos and back to refresh the env — easy to get wrong, easy
to forget.

When `direnv export json` exits non-zero, follow up with `direnv status
--json` to ask direnv whether the current directory has a not-yet-
allowed .envrc, and if so, get its path. Then show a confirmation popup
with the .envrc contents inline so the user can read what they're
approving. Confirming runs `direnv allow <path>` and re-runs the load
so the new env reaches subprocesses immediately; cancelling leaves the
env unloaded (the same state as before this commit when direnv refused
to load the .envrc).

Using `direnv status --json` instead of parsing the "is blocked"
stderr line means we rely on direnv's structured output rather than
its human-readable error format, which is more stable across versions
and avoids assumptions about output formatting.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 09:05:01 +02:00
Stefan HallerandClaude Opus 4.7 bb8955f2de Load direnv environment when switching repos
When a user opens a repo from the recent-repos menu or jumps between
worktrees inside lazygit, only the env vars present at process startup
reach subprocesses. That breaks pre-commit hooks and other tools whose
dependencies are pulled in by a per-repo .envrc — users were left with
read-only operations because the env their shell would normally load via
direnv never made it into lazygit's git invocations.

Shell out to `direnv export json` after each chdir and apply the JSON
delta via os.Setenv/Unsetenv. direnv tracks the previous load in its own
DIRENV_DIFF env var, so the delta also unloads vars from the old repo
when entering one without a matching .envrc. If direnv isn't on PATH the
call is a no-op, so users who don't use direnv pay nothing and users who
do need no config to opt in. Any stderr direnv emits (loading messages,
"blocked .envrc" errors, etc.) goes to the command log.

The integration test puts a fake direnv on PATH and asserts that a value
it exports reaches a custom command after switching repos. Wiring this
up needed runner.go to support `{{actualPath}}` placeholders in
ExtraEnvVars, mirroring the existing support for ExtraCmdArgs, so the
test can prepend a fixture-relative directory to PATH.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-06-04 09:05:01 +02:00
Stefan Haller 2601556189 Dedupe the recent-repos fallback in setupRepo
The for-loop here was a verbatim copy of openRecentRepo, so call that instead.
2026-06-04 09:05:01 +02:00
Stefan Haller 685dfc87a4 Cleanup: drop unneeded variable 2026-06-04 09:05:01 +02:00
Stefan Haller d86a49ba3f When RecordCurrentDirectory fails, only log the error
If we return the error here, we don't switch repos, but the chdir
happened already, so this would be an inconsistent state (a lot of
lazygit's code assumes that the current directory is always the worktree
root). Only log the error; failing to record the current directory is
not the end of the world.

Also, it is very unlikely to happen; RecordCurrentDirectory only writes
to a small file, and if this fails, then either there is filesystem
corruption of the disk is full, and in both cases the user likely has
much bigger problems.
2026-06-04 09:05:01 +02:00
Stefan HallerandGitHub 009c8975be Additions to AGENTS.md (#5667) 2026-06-03 09:21:42 +02:00
Stefan Haller cc6a0374e8 Additions to AGENTS.md 2026-06-03 09:18:31 +02:00
Stefan HallerandGitHub 16cf2ff1a9 Fix the waiting status display for synchronous operations (#5659)
Commit 4f0393f97b caused a regression: for operations that use
WithWaitingStatusSync (examples are squashing fixups, moving commits up
or down, cherry-picking, creating fixup commits, and more), the waiting
status wouldn't show during the operation; however, it would show after
the operation was done, and then linger forever.

The cause: since 4f0393f97b, layout sizes the bottom line from the
actual content of the AppStatus view rather than from the status
manager. The async render path keeps the view in sync (it sets the
buffer on the first tick and clears it to "" when the status ends), but
the sync path used by WithWaitingStatusSync did not:

- It called ForceLayoutAndRedraw before writing anything to the view, so
layout saw an empty buffer and left no room; the status never appeared
during the operation.
- When the operation finished it just broke out of the loop, leaving the
last spinner frame in the buffer. Every subsequent layout kept reserving
room for that stale content, so the status stuck around forever.

Fix this by writing the status into the view before the initial layout,
and clearing it again when stopping.
2026-05-30 14:25:21 +02:00
Stefan Haller 101d7965ae Fix the waiting status display for synchronous operations
Commit 4f0393f97b caused a regression: for operations that use
WithWaitingStatusSync (examples are squashing fixups, moving commits up or down,
cherry-picking, creating fixup commits, and more), the waiting status wouldn't
show during the operation; however, it would show after the operation was done,
and then linger forever.

The cause: since 4f0393f97b, layout sizes the bottom line from the actual
content of the AppStatus view rather than from the status manager. The async
render path keeps the view in sync (it sets the buffer on the first tick and
clears it to "" when the status ends), but the sync path used by
WithWaitingStatusSync did not:

- It called ForceLayoutAndRedraw before writing anything to the view, so layout
  saw an empty buffer and left no room; the status never appeared during the
  operation.
- When the operation finished it just broke out of the loop, leaving the last
  spinner frame in the buffer. Every subsequent layout kept reserving room for
  that stale content, so the status stuck around forever.

Fix this by writing the status into the view before the initial layout, and
clearing it again when stopping.
2026-05-30 14:20:05 +02:00
Stefan Haller 64d244cfcb Refactor: extract private setAppStatusContent helper method 2026-05-30 13:59:17 +02:00
Stefan HallerandGitHub f2788e475e Add docs for how to add the default, non-pager diff to the list of pagers (#5656)
See #5328.
2026-05-28 19:46:47 +02:00
Stefan Haller 115b72d98b Add docs for how to add the default, non-pager diff to the list of pagers 2026-05-28 19:41:45 +02:00
Stefan Haller 371f57c76e Fix minor typos in README.md 2026-05-28 19:36:01 +02:00
Stefan HallerandGitHub ff8f3d790e Fix crash when keybindings are disabled that normally show in the status bar (#5655)
If a keybinding that we want to display in the options bar was set to
`<disabled>` by the user, in pre-0.62 versions we would still display
the command, but with no keybinding. This was arguably not very useful
before, but now it actually crashes because we would now try to display
the first key of the slice of configured keys (crash introduced in
3d18ee8f91). Fix the crash by not showing those commands at all.
2026-05-28 19:31:42 +02:00
Stefan Haller b3491f4e37 Cleanup: filter out empty keybindings earlier
This doesn't make a difference for the behavior, it just looks strange to
include the empty bindings first and then filter them out in the next statement.
2026-05-28 19:26:43 +02:00
Stefan Haller 76d0dc15ca Fix crash when keybindings are disabled that we want to show in the status bar
If a keybinding that we want to display in the options bar was set to <disabled>
by the user, in pre-0.62 versions we would still display the command, but with
no keybinding. This was arguably not very useful before, but now it actually
crashes because we would now try to display the first key of the slice of
configured keys (crash introduced in 3d18ee8f91). Fix the crash by not showing
those commands at all.
2026-05-28 19:26:43 +02:00
Stefan HallerandGitHub 7299b224ef Fix breaking changes note (#5646)
Ctrl+s used to be a separate binding confirmInEditor-alt, but now that
it was folded into the main confirmInEditor, we need to mention both
bindings here.

Also use the new syntax while we're at it.
2026-05-26 22:31:03 +02:00
Stefan Haller 5e326853dc Fix breaking changes note
Ctrl+s used to be a separate binding confirmInEditor-alt, but now that it was
folded into the main confirmInEditor, we need to mention both bindings here.

Also use the new syntax while we're at it.
2026-05-26 22:27:36 +02:00
Stefan HallerandGitHub 8b4d043d52 Update docs and schema for release (#5645) 2026-05-26 22:16:14 +02:00
Stefan Haller 07d73fbbee Update docs and schema for release 2026-05-26 22:12:31 +02:00
Stefan HallerandGitHub a85d81b137 Update translations from Crowdin (#5644) 2026-05-26 22:11:50 +02:00
Stefan Haller 064e9a4c98 Update translations from Crowdin 2026-05-26 22:08:49 +02:00
Stefan HallerandGitHub 258afbce8f Add support for git flow using the git-flow-next tool (#5288)
This change enables Lazygit `git-flow` integration to work with
`git-flow-next`. The "official" `git-flow` has been deprecated and
replaced by `git-flow-next`. `got-flow-next` has the same tool and most
of the functionality is compatible but the `git config` is different so
Lazygit doesn't recognise it.

- Support gitflow.branch.<type>.prefix (git-flow-next) in addition to
gitflow.prefix.<type> (legacy)
- Refactor FinishCmdObj to use a prefix map lookup to find the branch
type
2026-05-26 22:06:58 +02:00
Stefan HallerandGitHub 53e39dc7b8 Bump goreleaser/goreleaser-action from 7.1.0 to 7.2.2 (#5619)
Bumps
[goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action)
from 7.1.0 to 7.2.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/goreleaser/goreleaser-action/releases">goreleaser/goreleaser-action's
releases</a>.</em></p>
<blockquote>
<h2>v7.2.2</h2>
<h2>What's Changed</h2>
<ul>
<li>ci(deps): bump the actions group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/goreleaser/goreleaser-action/pull/560">goreleaser/goreleaser-action#560</a></li>
<li>fix: nightly resolution to select newest published release by <a
href="https://github.com/Copilot"><code>@​Copilot</code></a> in <a
href="https://redirect.github.com/goreleaser/goreleaser-action/pull/562">goreleaser/goreleaser-action#562</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/Copilot"><code>@​Copilot</code></a> made
their first contribution in <a
href="https://redirect.github.com/goreleaser/goreleaser-action/pull/562">goreleaser/goreleaser-action#562</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/goreleaser/goreleaser-action/compare/v7...v7.2.2">https://github.com/goreleaser/goreleaser-action/compare/v7...v7.2.2</a></p>
<h2>v7.2.1</h2>
<p>This fully removes the usage of the old <code>nightly</code> moving
tag.</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/goreleaser/goreleaser-action/compare/v7.2.0...v7.2.1">https://github.com/goreleaser/goreleaser-action/compare/v7.2.0...v7.2.1</a></p>
<h2>v7.2.0</h2>
<h2>What's Changed</h2>
<ul>
<li>test: cover install across release eras by <a
href="https://github.com/caarlos0"><code>@​caarlos0</code></a> in <a
href="https://redirect.github.com/goreleaser/goreleaser-action/pull/555">goreleaser/goreleaser-action#555</a></li>
<li>feat: add <code>version-file</code> input by <a
href="https://github.com/caarlos0"><code>@​caarlos0</code></a> in <a
href="https://redirect.github.com/goreleaser/goreleaser-action/pull/556">goreleaser/goreleaser-action#556</a></li>
<li>feat: resolve nightly to latest vX.Y.Z-<!-- raw HTML omitted
-->-nightly release by <a
href="https://github.com/caarlos0"><code>@​caarlos0</code></a> in <a
href="https://redirect.github.com/goreleaser/goreleaser-action/pull/558">goreleaser/goreleaser-action#558</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/goreleaser/goreleaser-action/compare/v7...v7.2.0">https://github.com/goreleaser/goreleaser-action/compare/v7...v7.2.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/goreleaser/goreleaser-action/commit/5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89"><code>5daf1e9</code></a>
fix: nightly resolution to select newest published release (<a
href="https://redirect.github.com/goreleaser/goreleaser-action/issues/562">#562</a>)</li>
<li><a
href="https://github.com/goreleaser/goreleaser-action/commit/5cc7ebb73d78b8f1d7b03c568e7df999c2889ccf"><code>5cc7ebb</code></a>
ci: update actions</li>
<li><a
href="https://github.com/goreleaser/goreleaser-action/commit/702f5f91c9334614254ddeabeebaf820d707f0d6"><code>702f5f9</code></a>
ci(deps): bump the actions group with 3 updates (<a
href="https://redirect.github.com/goreleaser/goreleaser-action/issues/560">#560</a>)</li>
<li><a
href="https://github.com/goreleaser/goreleaser-action/commit/1a80836c5c9d9e5755a25cb59ec6f45a3b5f41a8"><code>1a80836</code></a>
ci(nightly): pass GITHUB_TOKEN to nightly integration job</li>
<li><a
href="https://github.com/goreleaser/goreleaser-action/commit/a71152e8274c84525d8835ba71448d64d2023702"><code>a71152e</code></a>
refactor: drop legacy 'nightly' tag fallback</li>
<li><a
href="https://github.com/goreleaser/goreleaser-action/commit/4c6ab561adb47e50c45ef534e2155934e91c40c1"><code>4c6ab56</code></a>
feat: resolve nightly to latest vX.Y.Z-&lt;sha&gt;-nightly release (<a
href="https://redirect.github.com/goreleaser/goreleaser-action/issues/558">#558</a>)</li>
<li><a
href="https://github.com/goreleaser/goreleaser-action/commit/4f96abf297f872baa17cd502a9b5ef0725fd1edc"><code>4f96abf</code></a>
feat: add <code>version-file</code> input (<a
href="https://redirect.github.com/goreleaser/goreleaser-action/issues/556">#556</a>)</li>
<li><a
href="https://github.com/goreleaser/goreleaser-action/commit/15fa2a96d4a23f516334bb340969ca4e9c82f0fa"><code>15fa2a9</code></a>
test: cover install across release eras (<a
href="https://redirect.github.com/goreleaser/goreleaser-action/issues/555">#555</a>)</li>
<li>See full diff in <a
href="https://github.com/goreleaser/goreleaser-action/compare/e24998b8b67b290c2fa8b7c14fcfa7de2c5c9b8c...5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=goreleaser/goreleaser-action&package-manager=github_actions&previous-version=7.1.0&new-version=7.2.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2026-05-26 10:07:14 +02:00
Stefan HallerandGitHub 8bdbfbd928 Bump github.com/gdamore/tcell/v3 from 3.3.0 to 3.4.0 (#5618)
Bumps [github.com/gdamore/tcell/v3](https://github.com/gdamore/tcell)
from 3.3.0 to 3.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gdamore/tcell/releases">github.com/gdamore/tcell/v3's
releases</a>.</em></p>
<blockquote>
<h2>Version 3.4.0 Feature Release</h2>
<p>This release has quite a number of bug fixes, but it <em>also</em>
introduces some substantial new capabilities.
Mostly the new support for advanced key reporting, along with backing
support in the mouse demo, and
enhanced configurability and overrides both for the application and for
the user (environment variables).</p>
<p>This also replaces the old WASM terminal with a new version based on
the libghostty implementation. This
should be much faster, and nicer to work with, with a larger set of full
features such as advanced key reporting,
better support for resizing, etc.</p>
<h2>What's Changed</h2>
<ul>
<li>fix: possible panic in getConsoleInput if no event returned by <a
href="https://github.com/AntoineGS"><code>@​AntoineGS</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1068">gdamore/tcell#1068</a></li>
<li>Sanitize titles and notifications (fixes <a
href="https://redirect.github.com/gdamore/tcell/issues/1066">#1066</a>)
by <a href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1069">gdamore/tcell#1069</a></li>
<li>feat: Optionally sanitize content before putting to the terminal
(fix… by <a href="https://github.com/gdamore"><code>@​gdamore</code></a>
in <a
href="https://redirect.github.com/gdamore/tcell/pull/1071">gdamore/tcell#1071</a></li>
<li>feat: Add reporting of keyboard protocol (fixes <a
href="https://redirect.github.com/gdamore/tcell/issues/967">#967</a>) by
<a href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1073">gdamore/tcell#1073</a></li>
<li>C1 handling improvements by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1074">gdamore/tcell#1074</a></li>
<li>feat(keys): Add support for advanced key reporting by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1075">gdamore/tcell#1075</a></li>
<li>feat(wasm): Introduce ghostty-wasm as backing WASM terminal (fixes
<a href="https://redirect.github.com/gdamore/tcell/issues/7">#7</a>… by
<a href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1076">gdamore/tcell#1076</a></li>
<li>fix: close OSC8 hyperlinks (fixes <a
href="https://redirect.github.com/gdamore/tcell/issues/1078">#1078</a>)
by <a href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1080">gdamore/tcell#1080</a></li>
<li>feat: KeyBacktab updates for advanced mode (fixes <a
href="https://redirect.github.com/gdamore/tcell/issues/1018">#1018</a>)
by <a href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1081">gdamore/tcell#1081</a></li>
<li>feat: support pixel-precision mouse reporting (CSI ?1016h) by <a
href="https://github.com/ImGajeed76"><code>@​ImGajeed76</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1077">gdamore/tcell#1077</a></li>
<li>fix(input): accept Unicode modifyOtherKeys codepoints by <a
href="https://github.com/ayn2op"><code>@​ayn2op</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1083">gdamore/tcell#1083</a></li>
<li>Fix reporting of key releases by <a
href="https://github.com/tihirvon"><code>@​tihirvon</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1088">gdamore/tcell#1088</a></li>
<li>chore(deps): bump golang.org/x/term from 0.42.0 to 0.43.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/gdamore/tcell/pull/1085">gdamore/tcell#1085</a></li>
<li>chore(deps): bump golang.org/x/text from 0.36.0 to 0.37.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/gdamore/tcell/pull/1087">gdamore/tcell#1087</a></li>
<li>MInor bug fixes by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1097">gdamore/tcell#1097</a></li>
<li>Preserve orphaned UTF-16 surrogates on Windows by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1104">gdamore/tcell#1104</a></li>
<li>vt: prune tab stops after resize by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1105">gdamore/tcell#1105</a></li>
<li>vt: ignore malformed SGR parameters by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1106">gdamore/tcell#1106</a></li>
<li>Limit inbound control strings by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1107">gdamore/tcell#1107</a></li>
<li>fix: cells should be marked dirty even if they have no content
(fixes… by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1108">gdamore/tcell#1108</a></li>
<li>fix: lock SetSize screen mutations by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1109">gdamore/tcell#1109</a></li>
<li>tscreen: prevent terminal mutation after Fini by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1110">gdamore/tcell#1110</a></li>
<li>Avoid extra keyboard protocols on Windows by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1111">gdamore/tcell#1111</a></li>
<li>[codex] Fix OSC 8 hyperlink state transitions by <a
href="https://github.com/gdamore"><code>@​gdamore</code></a> in <a
href="https://redirect.github.com/gdamore/tcell/pull/1112">gdamore/tcell#1112</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/ImGajeed76"><code>@​ImGajeed76</code></a> made
their first contribution in <a
href="https://redirect.github.com/gdamore/tcell/pull/1077">gdamore/tcell#1077</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/gdamore/tcell/compare/v3.3.0...v3.4.0">https://github.com/gdamore/tcell/compare/v3.3.0...v3.4.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/gdamore/tcell/commit/c67165c6c22b6758eb43209aaee45303f5b08b5b"><code>c67165c</code></a>
[codex] Fix OSC 8 hyperlink state transitions (<a
href="https://redirect.github.com/gdamore/tcell/issues/1112">#1112</a>)</li>
<li><a
href="https://github.com/gdamore/tcell/commit/3f24a1a19539fe8bb49afb61c67e0dfe28f9f587"><code>3f24a1a</code></a>
test: Include test case for Apple Terminal</li>
<li><a
href="https://github.com/gdamore/tcell/commit/0af1f676676442cc1046520664438302190a042b"><code>0af1f67</code></a>
feat: add terminal override controls</li>
<li><a
href="https://github.com/gdamore/tcell/commit/d3371c05d85216d34b39be2e2b47c4e94b3a39cb"><code>d3371c0</code></a>
fix: remove the 25ms startup delay for primary DA</li>
<li><a
href="https://github.com/gdamore/tcell/commit/7da1880519f20526595f1bb4a87485203a755c6c"><code>7da1880</code></a>
feat: report WezTerm and Terminal.app when using env var detection</li>
<li><a
href="https://github.com/gdamore/tcell/commit/defbc72dec171b78f7ae2ddd2d8cb665cf01ee3e"><code>defbc72</code></a>
fix: avoid extra keyboard protocols on windows and hard code WezTerm
capabili...</li>
<li><a
href="https://github.com/gdamore/tcell/commit/a8373181b0bc6756fa709c26dbcb704b33914305"><code>a837318</code></a>
tscreen: prevent terminal mutation after Fini (<a
href="https://redirect.github.com/gdamore/tcell/issues/1110">#1110</a>)</li>
<li><a
href="https://github.com/gdamore/tcell/commit/d7fff268b396f0b946f3dab55a8ea56cb4348ac0"><code>d7fff26</code></a>
fix: lock SetSize screen mutations (fixes <a
href="https://redirect.github.com/gdamore/tcell/issues/1098">#1098</a>)
(<a
href="https://redirect.github.com/gdamore/tcell/issues/1109">#1109</a>)</li>
<li><a
href="https://github.com/gdamore/tcell/commit/b91ae6def9d0328e555afd269d15cd9c96193c25"><code>b91ae6d</code></a>
fix: cells should be marked dirty even if they have no content (fixes <a
href="https://redirect.github.com/gdamore/tcell/issues/1089">#1089</a>)
...</li>
<li><a
href="https://github.com/gdamore/tcell/commit/c01e1075d57b074d0ec7f2af886549e36cf74302"><code>c01e107</code></a>
fix: limit inbound control strings (<a
href="https://redirect.github.com/gdamore/tcell/issues/1107">#1107</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/gdamore/tcell/compare/v3.3.0...v3.4.0">compare
view</a></li>
</ul>
</details>
<br />
2026-05-26 10:03:03 +02:00
Stefan HallerandGitHub 323fb469d3 Bump golang.org/x/sys from 0.43.0 to 0.45.0 (#5607)
Bumps [golang.org/x/sys](https://github.com/golang/sys) from 0.43.0 to
0.45.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/golang/sys/commit/397d5f80920585bc27433d878aba498d062f81e1"><code>397d5f8</code></a>
unix: update to Linux kernel 7.0</li>
<li><a
href="https://github.com/golang/sys/commit/0a387f7a07d7a0e9811f00603c10b4e5a94ab79c"><code>0a387f7</code></a>
cpu: detect zbc extension on riscv64</li>
<li><a
href="https://github.com/golang/sys/commit/758f71cb839d131daf0ba4befa6a2c6ceb21a649"><code>758f71c</code></a>
cpu: add LLACQ_SCREL, SCQ, DBAR_HINTS detection for loong64</li>
<li><a
href="https://github.com/golang/sys/commit/99666ae32e07f6403182a79cb5df0c417cbbf25f"><code>99666ae</code></a>
unix: merge Linux readv/writev implementation with Darwin/OpenBSD</li>
<li><a
href="https://github.com/golang/sys/commit/e4444cbaaaf61cecff8e635874066fcd5c841575"><code>e4444cb</code></a>
windows: add NtSetEaFile, NtQueryEaFile and NtQueryInformationFile</li>
<li><a
href="https://github.com/golang/sys/commit/04396e85d470b7f990a9a1df5c1a44dc8e30c292"><code>04396e8</code></a>
unix: add Readv, Writev, Preadv, Pwritev for OpenBSD</li>
<li><a
href="https://github.com/golang/sys/commit/fb1facd76f95fa87c151018200ea5e4892ff115d"><code>fb1facd</code></a>
windows: avoid uint16 overflow in NewNTUnicodeString</li>
<li><a
href="https://github.com/golang/sys/commit/94ad893e1e59c1d079221324d38945d2aad8703f"><code>94ad893</code></a>
windows: add GetIfTable2Ex, GetIpInterface{Entry,Table},
GetUnicastIpAddressT...</li>
<li><a
href="https://github.com/golang/sys/commit/54fe89f8411576c06b345b341ca79a77d878a4ad"><code>54fe89f</code></a>
cpu: use IsProcessorFeaturePresent to calculate ARM64 on windows</li>
<li><a
href="https://github.com/golang/sys/commit/df7d5d7b60641d17d87e2b50911124cb65f954fd"><code>df7d5d7</code></a>
unix: automatically remove container created by mkall.sh</li>
<li>Additional commits viewable in <a
href="https://github.com/golang/sys/compare/v0.43.0...v0.45.0">compare
view</a></li>
</ul>
</details>
<br />
2026-05-26 09:58:12 +02:00
Stefan HallerandGitHub 32f8a601e3 Bump github.com/sahilm/fuzzy from 0.1.1 to 0.1.2 (#5606)
Bumps [github.com/sahilm/fuzzy](https://github.com/sahilm/fuzzy) from
0.1.1 to 0.1.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sahilm/fuzzy/releases">github.com/sahilm/fuzzy's
releases</a>.</em></p>
<blockquote>
<h2>v0.1.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Dust off the repo by <a
href="https://github.com/sahilm"><code>@​sahilm</code></a> in <a
href="https://redirect.github.com/sahilm/fuzzy/pull/25">sahilm/fuzzy#25</a></li>
<li>Ignore match strings past the first NUL rune by <a
href="https://github.com/nfreya"><code>@​nfreya</code></a> in <a
href="https://redirect.github.com/sahilm/fuzzy/pull/24">sahilm/fuzzy#24</a></li>
<li><code>FindFrom</code> respects original ordering by <a
href="https://github.com/SayYoungMan"><code>@​SayYoungMan</code></a> in
<a
href="https://redirect.github.com/sahilm/fuzzy/pull/28">sahilm/fuzzy#28</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sahilm/fuzzy/compare/v0.1.1...v0.1.2">https://github.com/sahilm/fuzzy/compare/v0.1.1...v0.1.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sahilm/fuzzy/commit/2cea772ce2570ed08d64bb361ca6c4aed657645a"><code>2cea772</code></a>
Upgrade golangci-lint to fix the build</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/76e61c374b493c8bfb69f153d85b11d0bd6dc822"><code>76e61c3</code></a>
<code>FindFrom</code> respects original ordering (<a
href="https://redirect.github.com/sahilm/fuzzy/issues/28">#28</a>)</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/5ed613fa112b870187f5527adca006ab321e1c67"><code>5ed613f</code></a>
Merge pull request <a
href="https://redirect.github.com/sahilm/fuzzy/issues/24">#24</a> from
nfreya/bugfix/panic-on-nuls-in-data</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/3e298b8b9b5220566163f724f46063a08554179f"><code>3e298b8</code></a>
Merge branch 'master' into bugfix/panic-on-nuls-in-data</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/45469896957ec267e966e4eb7f4c043dcf0d8dc4"><code>4546989</code></a>
So long travis. Thank you.</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/f98d2a036ab04eeda9c68aa00c3986537c588e85"><code>f98d2a0</code></a>
switch to tools dujour; old ones deprecatd</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/45c5e49a0f797a65ddac91e058435ac588ba4646"><code>45c5e49</code></a>
Use go.mod now. Gopkg is deprecated.</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/12ea3fbc397c63edd7ee5afc924538ca054c57ef"><code>12ea3fb</code></a>
Add test for NULs in search data</li>
<li><a
href="https://github.com/sahilm/fuzzy/commit/7e3799a5990d343000b5f3863319c8e68f84b55f"><code>7e3799a</code></a>
Ignore match strings past the first NUL rune</li>
<li>See full diff in <a
href="https://github.com/sahilm/fuzzy/compare/v0.1.1...v0.1.2">compare
view</a></li>
</ul>
</details>
<br />
2026-05-26 09:53:50 +02:00
Stefan HallerandGitHub 21b59f9e33 Fix undo shortcut in Undoing.md (#5640)
We fixed this recently in the Readme (see 7a3bae4de1), but forgot to
update this.

Fixes #5630.
2026-05-26 09:49:16 +02:00
Stefan Haller 9ae76d7eec Fix undo shortcut in Undoing.md
We fixed this recently in the Readme (see 7a3bae4de1), but forgot to update
this.
2026-05-26 09:45:41 +02:00
Stefan HallerandGitHub 87e6959fca Bump github.com/gookit/color from 1.6.0 to 1.6.1 (#5586)
Bumps [github.com/gookit/color](https://github.com/gookit/color) from
1.6.0 to 1.6.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gookit/color/releases">github.com/gookit/color's
releases</a>.</em></p>
<blockquote>
<h2>v1.6.1</h2>
<h2>Change Log</h2>
<h3>Fixed</h3>
<ul>
<li>fix: re-apply color after nested reset in RenderString (<a
href="https://redirect.github.com/gookit/color/issues/119">#119</a>) <a
href="https://github.com/gookit/color/commit/e58a89993a645812200c6311a5937ae648befd0b">https://github.com/gookit/color/commit/e58a89993a645812200c6311a5937ae648befd0b</a></li>
<li>fix(detect): should enable VTP on windows CMD,PWSH <a
href="https://github.com/gookit/color/commit/2bb27a593f48682806b2e996fa2af1308db1a992">https://github.com/gookit/color/commit/2bb27a593f48682806b2e996fa2af1308db1a992</a></li>
<li>fix(convert): incorrect conversion between integer types <a
href="https://github.com/gookit/color/commit/1245572809a858016e674809c7f0a38686f08b2e">https://github.com/gookit/color/commit/1245572809a858016e674809c7f0a38686f08b2e</a></li>
</ul>
<h3>Other</h3>
<ul>
<li>build(deps): bump github/codeql-action from 3 to 4 (<a
href="https://redirect.github.com/gookit/color/issues/113">#113</a>) <a
href="https://github.com/gookit/color/commit/2e1842657d62fc51d41b495d79b08c50abe5e7e8">https://github.com/gookit/color/commit/2e1842657d62fc51d41b495d79b08c50abe5e7e8</a></li>
<li>build(deps): bump actions/checkout from 5 to 6 (<a
href="https://redirect.github.com/gookit/color/issues/115">#115</a>) <a
href="https://github.com/gookit/color/commit/ed1b9cc4781794494ec2f105f6511d5f1932a1fd">https://github.com/gookit/color/commit/ed1b9cc4781794494ec2f105f6511d5f1932a1fd</a></li>
<li>Add 'stable' to Go version matrix and update action <a
href="https://github.com/gookit/color/commit/de1e24367ef83e8bb955e8090290c188c4ed1dfc">https://github.com/gookit/color/commit/de1e24367ef83e8bb955e8090290c188c4ed1dfc</a></li>
<li>ci(release): remove Go version matrix and simplify build steps in
release action <a
href="https://github.com/gookit/color/commit/d232e114aa3d6d7b66dd5edc442d89e48bf366ae">https://github.com/gookit/color/commit/d232e114aa3d6d7b66dd5edc442d89e48bf366ae</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/gookit/color/commit/d232e114aa3d6d7b66dd5edc442d89e48bf366ae"><code>d232e11</code></a>
ci(release): remove Go version matrix and simplify build steps in
release action</li>
<li><a
href="https://github.com/gookit/color/commit/1245572809a858016e674809c7f0a38686f08b2e"><code>1245572</code></a>
fix(convert): incorrect conversion between integer types</li>
<li><a
href="https://github.com/gookit/color/commit/2bb27a593f48682806b2e996fa2af1308db1a992"><code>2bb27a5</code></a>
fix(detect): should enable VTP on windows CMD,PWSH</li>
<li><a
href="https://github.com/gookit/color/commit/e58a89993a645812200c6311a5937ae648befd0b"><code>e58a899</code></a>
fix: re-apply color after nested reset in RenderString (<a
href="https://redirect.github.com/gookit/color/issues/119">#119</a>)</li>
<li><a
href="https://github.com/gookit/color/commit/de1e24367ef83e8bb955e8090290c188c4ed1dfc"><code>de1e243</code></a>
Add 'stable' to Go version matrix and update action</li>
<li><a
href="https://github.com/gookit/color/commit/ed1b9cc4781794494ec2f105f6511d5f1932a1fd"><code>ed1b9cc</code></a>
build(deps): bump actions/checkout from 5 to 6 (<a
href="https://redirect.github.com/gookit/color/issues/115">#115</a>)</li>
<li><a
href="https://github.com/gookit/color/commit/2e1842657d62fc51d41b495d79b08c50abe5e7e8"><code>2e18426</code></a>
build(deps): bump github/codeql-action from 3 to 4 (<a
href="https://redirect.github.com/gookit/color/issues/113">#113</a>)</li>
<li>See full diff in <a
href="https://github.com/gookit/color/compare/v1.6.0...v1.6.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/gookit/color&package-manager=go_modules&previous-version=1.6.0&new-version=1.6.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>
2026-05-26 09:42:13 +02:00
Stefan HallerandGitHub 822807ce48 Fix cycling pagers when main view is focused (#5639)
Fixes #5638.
2026-05-26 08:03:21 +02:00
Stefan Haller e6a8415162 Refresh main view when cycling pagers with main view focused
The previous logic only re-rendered the main view when the side panel itself was
focused. When the user pressed `0` to focus the main view, the
Normal/NormalSecondary context becomes Current and the equality check failed, so
cycling pagers had no visible effect. Mirror the pattern from postRefreshUpdate:
when the main view is focused, call HandleRenderToMain on the side panel below
it on the stack (which CurrentSide already returns).
2026-05-26 07:58:50 +02:00
Stefan Haller 137831630a Do less work to update the main view when cycling pagers
The call to HandleFocus worked fine too, but it was doing too much; all we
really need here is rerender the main view.
2026-05-26 07:54:29 +02:00
Stefan HallerandGitHub 273e340490 Add <alt+up>/<alt+down> as alternate keybindings for moving commits up/down (#5637)
I like these because they are the same as moving a line of code up or
down in Visual Studio Code.
2026-05-25 19:21:11 +02:00
Stefan Haller 2537995067 Add <alt+up>/<alt+down> as alternate keybindings for moving commits up/down
I like these because they are the same as moving a line of code up or down in
Visual Studio Code.
2026-05-25 19:15:54 +02:00
Stefan HallerandGitHub c826811eaf Allow keybindings to configure more than one key (#5634)
Keybindings in the user config file can now either be a single string as
before, or a list of strings, in which case the action can be triggered
by any of them.

This has two benefits:
- users can add alternatives that they want to use occasionally. One
example is the `<esc>` key: some users are used to typing it as `ctrl+[`
because this used to be possible in the legacy terminal protocol. With
recent changes to lazygit's keybinding system this no longer works out
of the box, since `<esc>` and `ctrl+[` are now distinct keys that can be
bound separately. But users who want the two to behave the same (as in
the old days) can now do
  ```yml
  keybinding:
    universal:
      return: [<esc>, "ctrl+["]
  ```
- we can get rid of all those `XyzAlt` bindings that we used to have,
for cases where we already wanted to have alternate keybindings by
default (for example `<up>`/`<down>` and `j`/`k` for going up and down
in a list). These can now be expressed a lot more elegantly, and require
less code.

The `XyzAlt` bindings are marked as deprecated but they are still
supported. We could instead have added a
migrator that changes users' config files and gets rid of the alt
configs for good already; I decided not to do that, because this would
render the config file invalid for older versions of lazygit, which
would then refuse to start; and that's annoying when bisecting bugs.
We'll keep the deprecated configs in the code for a year or so, and then
add the migrator.
2026-05-25 15:49:46 +02:00
Stefan Haller d0d58233ff If a menu entry has multiple keybindings, list them in a tooltip
We append them with a blank line to an existing tooltip if the item already has
one, or create a new tooltip if not.
2026-05-25 15:32:47 +02:00
Stefan Haller 3a3625d855 Fold remaining alt bindings into their main fields
Convert the remaining *Alt/*Alt[12] sibling fields (PrevItem/NextItem,
GotoTop/GotoBottom, PrevBlock/NextBlock, ScrollUpMain/ScrollDownMain,
OptionMenu, ConfirmInEditor, DiffingMenu) so the merge mechanism folds
their values into the corresponding main multi-key binding at config
load. The redundant alt-only Binding registrations across the various
controllers and the global keybindings file are gone: the merged main
field already carries every key, so the for-loop in SetKeybinding
registers them all.
2026-05-25 15:32:47 +02:00
Stefan Haller 2ba401909d Use a dedicated keybinding for hunk navigation in the main view
Previously the patch_explorer and merge_conflicts controllers reused
Universal.PrevBlock/NextBlock for moving between hunks (or conflicts) in the
main view, sharing keys with the global side-window cycle. The two operations
are conceptually distinct: cycling side windows is a global navigation gesture,
while next/prev hunk acts on the diff in the main view. Tying them together also
blocks adding <tab>/<backtab> as side- window-cycle keys, because <tab> already
means "toggle panel" in the staging view.

Add Main.PrevHunk/NextHunk to the existing KeybindingMainConfig (which already
groups bindings for the main view across staging, patch building, and merge
conflicts) and switch both controllers to it. The defaults match the active key
set those controllers had before (<left>/<right>/h/l), so the user-visible
behavior is unchanged.
2026-05-25 15:32:47 +02:00
Stefan Haller 022d24cb79 Fold legacy quit-alt1 into the multi-key quit binding
Now that quit accepts multiple keys, the historical quit-alt1 field is
redundant: existing configs that set it should keep working without the user
having to migrate, but the lazygit code shouldn't have to register the alt
binding separately.

Add a merge step that runs after the user config is loaded (and from
NewDummyAppConfig, which the cheatsheet generator and integration tests go
through) folding the alt value into the main key list. Mark QuitAlt1 deprecated
so it disappears from the generated Config.md example, while staying in the JSON
schema with a description so editors can still steer users toward the new form.
Note that instead of marking the alt config as deprecated, we could have added a
migrator that changes users' config files and gets rid of the alt config for
good. I decided not to do that, because this would render the config file
invalid for older versions of lazygit, which would then refuse to start; and
that's annoying when bisecting bugs. We'll keep the deprecated configs in the
code for a year or so, and then add the migrator.

The next commit will fold the remaining ~15 -alt-style fields the same way; the
helper is shaped to keep that mechanical.
2026-05-25 15:32:47 +02:00
Stefan Haller fbcf562e29 Convert custom command Key fields to Keybinding
CustomCommand.Key and CustomCommandMenuOption.Key are user-configured
keybindings just like the built-in ones. Converting them to the Keybinding type
lets a user assign multiple keys to the same custom command, e.g. `key: [a, b]`,
the same way they would for any other keybinding.

The validator iterates over the elements rather than checking a single string,
the binding registration goes through GetValidatedKeyBindingKeys to register
every alternate, and the existing error messages use .String() so a multi-key
binding renders sensibly.

CustomCommandPrompt.Key (a form field name, not a keybinding) stays a plain
string.
2026-05-25 15:32:47 +02:00
Stefan Haller 3ecca88bd8 Convert JumpToBlock to a list of multi-key bindings
JumpToBlock is special: each of its 5 elements is the binding for one side
window (status / files / branches / commits / stash), not an alternate for a
single command. Change the field from []string to []Keybinding so each window
slot can have alternates of its own.

The schema becomes "an array of 5 keybindings, each itself a string or array of
strings", which falls out cleanly from how the Keybinding type inlines into the
generated schema. Existing configs (a flat array of 5 strings) keep validating
because each element is unmarshalled through Keybinding's scalar-or-sequence
decoder.
2026-05-25 15:32:47 +02:00
Stefan Haller 5748d82073 Convert keybinding fields to Keybinding
Until now every keybinding config field was a plain string. That meant a user
couldn't ask for two keys to invoke a command — the config silently accepted
only one form.

Convert every string-typed field across all 13 KeybindingXxxConfig structs to
Keybinding so the union type extends to every command. Defaults wrap their
single-key value in Keybinding{...} so the generated Config.md still renders one
scalar key per binding.

The alt fields keep their separate Binding registrations for now: this commit
does not yet introduce the merge mechanism that folds them into the main field —
that comes in a follow-up. Consumers previously calling opts.GetKeys on a string
field now call opts.GetKeys on the Keybinding, or take .String() / Keys[0] where
a single value is needed.

Adds a Keybinding.String helper for rendering, schema-generator work that
inlines the Keybinding union into each consuming property, and a unit test
covering the user-facing scalar/sequence YAML forms for quit.
2026-05-25 15:32:47 +02:00
Stefan Haller 06b8d5a1e4 Add Keybinding type that accepts a string or a sequence of strings
Each user-configurable keybinding is currently a single string in the YAML
config. To let users assign alternate keys to a command, introduce a Keybinding
type that decodes from either a scalar (the existing single-key form, kept for
backward compatibility and for a simpler config file) or a sequence of strings.
Marshalling collapses single-element slices back to a scalar so configs and
generated docs round-trip cleanly.

JSONSchema describes the type as a oneOf union so editors validate either form;
subsequent commits will inline the union into the generated schema and start
using Keybinding as the field type.
2026-05-25 15:18:18 +02:00
Stefan Haller f08a49fe52 Render every key for a binding in the cheatsheet
The cheatsheet has been showing only the first key of each binding
since Binding.Key became Binding.Keys; collapse the list back into a
single comma-separated cell so users can see all the alternates at a
glance once bindings start carrying more than one key.
2026-05-25 15:18:18 +02:00
Stefan Haller 26366641c0 Rename Key to Keys in Binding, KeybindingsOpts, and MenuItem
This is a straight rename with no other code changes. Doing it in a separate
commit to keep the diff of the previous one somewhat readable.
2026-05-25 15:18:18 +02:00
Stefan Haller 3d18ee8f91 Use a slice of keys for each binding
This is a pure refactor in preparation for letting users configure multiple
alternate bindings for a single command. Every Binding still has exactly one
key, so nothing changes visibly: the cheatsheet, the on-screen options bar,
and the keybindings menu all render identically.

When a Binding ends up with multiple keys, the on-screen options bar will
show only the first (to avoid clutter); the cheatsheet will show all of them (in
a later commit). For now both paths take Key[0].

MenuItem.Key is changed in the same way, it also has a slice of keys now.

In this commit we keep the name `Key` in Binding, KeybindingOpts and MenuItem,
instead of renaming them to `Keys` right away, in order to keep the diff a bit
more readable. We'll do the rename separately in the next commit.
2026-05-25 15:18:18 +02:00
Stefan Haller 22a508fdba Add menuKey helper to reduce noise on menu item literals
Constructing a menu item key from a literal character requires
gocui.NewKeyRune('r'), which is a bit noisy. Add a private menuKey helper in
both the controllers and helpers packages so the common case in either reads as
menuKey('r'). Duplicating the one-liner is cheaper than a cross-package import
dependency and avoids forcing every controller file to qualify the call.

The reason for doing this now is that we are going to change MenuItem.Key to a
slice of keys later in the branch, which means we'd have to add `[]gocui.Key{`
at each call site, making them even more noisy. With the menuKey helper we can
just change its signature and leave all clients unchanged.
2026-05-25 15:18:18 +02:00
Stefan Haller 12cfb9be1f Remove OptionMenuAlt1
For legacy reasons, OptionMenu was set to `<disabled>`, and OptionMenuAlt1 to
`?`. This doesn't make a lot of sense any more; get rid of OptionMenuAlt1 and
bind OptionMenu to `?` by default. This is a breaking change for users who
rebound OptionMenuAlt1 in their config, but it doesn't strike me as very likely,
and it's easy enough to fix.
2026-05-25 15:18:18 +02:00
Stefan Haller 3c279614bf Change SetKeybinding to not return an error
It always returned nil.
2026-05-25 15:18:18 +02:00
Stefan Haller 5a363578b4 Remove unused text KeybindingsLegend
Should have been removed in 74a6ea85c8.
2026-05-25 15:18:18 +02:00
Stefan Haller 5bd91977ee Add script for checking all commits in a branch 2026-05-25 15:18:18 +02:00
Stefan Haller 880064b987 Use the isolated test env for shell commands
Shell.RunShellCommand was passing os.Environ() to its child, while its
sibling runCommandWithOutputAndEnv has used the minimal
NewTestEnvironment since late 2023 when env isolation was introduced;
the sh path was just missed.

This matters when integration tests run from inside a `git rebase -x`
exec in a linked worktree: git sets GIT_DIR=<main>/.git/worktrees/<name>
for the exec, and it leaks all the way down through bash, just, go test,
and the test process, into every git invocation RunShellCommand spawns.
cmd.Dir becomes irrelevant — git resolves GIT_DIR over cwd-based
discovery, with the work-tree taken from the gitdir file (i.e. the
worktree root). So `git checkout -b conflict` in a test fixture creates
the branch on the real worktree and switches its HEAD, hijacking the
in-progress rebase and trashing the working tree. (In the main worktree
git doesn't set GIT_DIR for rebase exec, which is why the bug was only
visible from linked worktrees.)

Using self.env also incidentally restores GIT_CONFIG_GLOBAL for shell
commands, so commits made via RunShellCommand are now authored by the
test config's CI identity rather than whatever the host's ~/.gitconfig
resolves to.
2026-05-25 15:18:18 +02:00
Stefan HallerandGitHub 608c90ae3c Avoid auto-forwarding main branches checked out in other worktrees (#5621)
After fetching, we auto-forward main branches that have fallen behind
their upstream, but skip any that are currently checked out in another
worktree — otherwise we'd update the ref behind that worktree's back,
leaving its working copy showing the inverse of what was just fetched.

The skip check had a hole though: when starting lazygit while no
worktrees have a main branch checked out, leaving it running in the
background, and then checking out a main branch in one of the other
worktrees outside of lazygit (e.g. in a lazygit instance in another
terminal, or using `git checkout` in the shell, or using some other git
client or IDE), then lazygit wouldn't notice the change, and the next
fetch would auto-forward main even though it is now checked out in a
worktree.

The fix is to include `WORKTREES` in the post-fetch refresh scope when
auto-forwarding is enabled. We gate on the config so users with
auto-forward disabled don't pay for an extra `git worktree list` plus
per-worktree rev-parse on every fetch tick.

A few small things picked up along the way landed as separate commits
first:

- Preserve the empty-slice fallback in `loadWorktrees` when `git
worktree list` fails — the fallback was being overwritten by the nil
return value on the next line.
- Add `PULL_REQUESTS` to the manual fetch refresh scope to match the
background fetch; looks like an oversight from when PR support was
added.
- Extract `BranchesHelper.PostFetchRefresh` so the two fetch paths can't
drift again.

Fixes #5020.
2026-05-21 14:27:44 +02:00
Stefan HallerandClaude Opus 4.7 4f6cdedb1e Refresh worktrees before auto-forwarding branches
AutoForwardBranches relies on the worktree model to skip any branch
that's currently checked out in another worktree (so we don't update
its ref behind the worktree's back). The post-fetch refresh wasn't
including the worktrees scope, so any external change to the worktree
list between lazygit's startup and the fetch — a `git worktree add`,
a `git checkout` in a linked worktree, a branch rename — left the
in-memory model stale and the skip check returned false negatives.

Add WORKTREES to the post-fetch refresh scope when auto-forwarding is
enabled. We gate on the config so users with auto-forward disabled
don't pay for an extra `git worktree list` plus per-worktree rev-parse
on every fetch tick.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 13:59:18 +02:00
Stefan HallerandClaude Opus 4.7 532cce4873 Add test for auto-forwarding a branch checked out in another worktree
When the linked worktree's branch is changed externally — by another
shell, by another tool, or by git running outside lazygit — lazygit's
worktrees model goes stale. The next post-fetch auto-forward then
doesn't realise the branch is now checked out elsewhere, and advances
its ref behind the worktree's back. The worktree's HEAD then resolves
to a commit its index/working tree haven't been updated to, and the
user sees that diff as the inverse of what was fetched — files
appearing as pending changes that they didn't make.

The test sets up a linked worktree initially on a side branch, then
externally checks out master in it before pressing fetch. Two
EXPECTED/ACTUAL pairs capture the symptoms: the branches view shows
master as `✓` rather than `↓1`, and switching to the linked worktree
shows master's would-be incoming file as a pending deletion against
HEAD.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 13:59:18 +02:00
Stefan HallerandClaude Opus 4.7 f032ee8b0f Extract BranchesHelper.PostFetchRefresh to unify the two fetch paths
The post-fetch logic was duplicated in `backgroundFetch` and the manual
fetch handler: refresh a fixed set of views, then auto-forward branches
if the fetch succeeded. The two had already drifted on the refresh
scope; folding them into a single helper makes the duplication go
away and prevents it from drifting again.

Pass the fetch error through so we preserve the previous behaviour of
refreshing unconditionally but only auto-forwarding on success.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 13:57:46 +02:00
Stefan HallerandClaude Opus 4.7 77652863c4 Refresh pull requests after a manual fetch
The background fetch path already includes PULL_REQUESTS in its
post-fetch refresh scope, but the manual fetch from the files view
doesn't. As far as I can tell that's an oversight from when
PULL_REQUESTS was added — there's no reason the two paths should
differ. Align them so both refresh PRs after fetching.

This also sets up the next commit to extract a shared helper for
the post-fetch refresh.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 13:57:46 +02:00
Stefan HallerandClaude Opus 4.7 7d1d90ae4d Preserve empty Worktrees slice when worktree list fails to load
If `git worktree list` fails, we want the Worktrees model to fall back
to an empty slice so callers iterating over it stay correct. The error
branch was setting it to `[]`, but the line below unconditionally
overwrote it with the nil `worktrees` value from the failed call.

Use an else branch so the empty-slice fallback actually sticks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 13:57:46 +02:00
Stefan Haller 49410fc953 Some additions to AGENTS.md 2026-05-21 13:57:46 +02:00
Stefan HallerandGitHub aca96a2f46 Add script to preview release notes (#5620)
Add a script to preview the release notes that would be generated if we
were to create a release now.
2026-05-21 09:27:09 +02:00
Stefan Haller 16e6d08281 Add script to preview release notes 2026-05-21 09:23:25 +02:00
Stefan HallerandGitHub c493503620 Remove the invitation to submit PRs from the issue template (#5603) 2026-05-11 16:28:36 +02:00
Stefan Haller 52ffc5465a Remove the invitation to submit PRs from the issue template 2026-05-11 16:02:35 +02:00
Stefan HallerandGitHub 353e3a1e4a Dont log GitHub PR fetching errors to the Command log (#5600)
In the Command log we only want to see errors for user-initiated
actions, not from background activity.
2026-05-10 15:49:43 +02:00
Stefan Haller 58abf24862 Log errors from fetching GitHub PRs to the debug log, not to the Command Log
In the Command Log we only want to see errors for user-initiated actions, not
from background activity.
2026-05-10 15:47:02 +02:00
Stefan Haller d9aceaf0da Keep GitHub PR refresh error logging in one place 2026-05-10 15:40:09 +02:00
Stefan HallerandGitHub 18ddc9ca9c Support GitHub Enterprise for the Pull Requests feature (#5596)
The feature to show PR icons in the branches list only worked for
github.com, but not for GitHub Enterprise remotes. This PR makes that
work, if you configure a services entry for it as explained
[here](https://github.com/jesseduffield/lazygit/blob/master/docs/Config.md#custom-pull-request-urls).

Prior art: #5559.
2026-05-10 15:30:54 +02:00
Stefan Haller 692f56a61b Optimize regex compilations
Compile them only once at startup. I didn't measure if this makes a difference,
but it's easy to do, and now that we potentially need to check them more often,
it might be worth it.
2026-05-10 15:28:14 +02:00
Stefan HallerandClaude Opus 4.7 eba1df11a8 Document that the services entry also enables GHE pull-request icons
The services config has been the path for GHE for a while (for the
View-PR-URL feature) but it now does double duty: it's also what enables
the branches-panel PR icons for non-github.com hosts. Worth calling out
explicitly so users don't assume it's still github.com-only.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 15:28:14 +02:00
Stefan Haller d955ba8fb8 Remove now unused code
Doing this in a separate commit makes the previous commit's diff easier to read.
2026-05-10 15:28:14 +02:00
Stefan HallerandClaude Opus 4.7 1c79fe24d0 Support GitHub Enterprise for the pull-requests feature
The branches-panel PR icons only worked for github.com remotes. There was no
fundamental reason — the auth library we already vendor (cli/go-gh) supports
enterprise tokens out of the box (GH_ENTERPRISE_TOKEN, gh auth's keyring),
and the user-facing 'services' config has long been the documented way to
tell lazygit "this domain is a github service" for the View-PR-URL feature.

The fetcher just hardcoded github.com in three places:
- a substring check on the remote URL to decide we're "in a github repo",
- the GraphQL endpoint (always api.github.com/graphql), and
- the auth lookup (always against the default host).

Plumb the resolved web domain through instead. Detection now goes through
the hosting_service ("is this remote's provider 'github'?"), which means a
user with services: { 'git.acme.com': 'github:git.acme.com' } configured
gets PR icons on their GHE remotes too.

Replacing the substring check with a provider check also tightens a latent
bug in getGithubRemotes: it previously accepted any remote whose URL parsed
with the default regex, including gitlab and bitbucket — masked today only
by the InGithubRepo gate, but exposed once the gate goes away.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 15:28:14 +02:00
Stefan HallerandClaude Opus 4.7 21d58085f4 Expose service info (provider, host, owner, repo) from the hosting service
The github pull-request fetcher needs to know whether a given remote is a
github-type service, which host its API lives on, and which owner/repo to
query against. Today the fetcher hardcodes the first two ("does the URL
contain github.com" and "https://api.github.com/graphql") and re-derives
owner/repo from the remote, which precludes GitHub Enterprise and makes
the fetch entry point take more arguments than it needs.

Add an accessor on the hosting service manager that exposes the already-
resolved service domain together with the parsed owner/repo, so callers
can answer all of these questions without reaching into the manager's
internals.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-10 15:28:14 +02:00
Stefan HallerandGitHub 88c540db12 Fix cherry-picking a range selection of commits (#5599)
After cherry-picking a commit, copying a range-selection of commits was
broken in that it would copy only the last selected commit rather than
all of them.
2026-05-09 14:08:20 +02:00
Stefan Haller 7a2d1ab544 Clear cherry-pick buffer when copying after a paste
After a successful paste DidPaste is true, hiding the "X commits copied"
indicator but leaving the buffer populated. From the user's perspective
this looks like a clean slate, so a new shift+C should start fresh. It is
important to reset DidPaste first, before populating the buffer with the new
commits, because otherwise each loop iteration would overwrite the previous one
since Add() rebuilds the set via SelectedHashSet() which returns empty while
DidPaste is set.
2026-05-09 14:02:42 +02:00
Stefan Haller f264d43a1a Add test for missing commits when range-copying after a paste
After a successful paste, the "X commits copied" indicator hides and
DidPaste is set, but the buffer is not cleared. If the user then
range-selects multiple commits and presses shift+C, every Add() call
rebuilds the set via SelectedHashSet(), which returns empty while
DidPaste is true; each iteration of the copy loop therefore overwrites
the previous one and only the last commit in the range survives.
2026-05-09 14:02:42 +02:00
Stefan Haller 1cab15eba8 Some additions to AGENTS.md 2026-05-09 14:02:42 +02:00
Stefan HallerandGitHub 84be8e130f Improve inline spinner performance (#5592)
As a followup to #5571, improve performance for inline spinners too.

This requires a bit of preparation; in particular, we change
ListContextTrait.HandleRender to no longer force a UI layout/redraw, so
callers need to take care of this themselves where needed. This requires
careful testing to see that we didn't miss any situation where redrawing
only worked by accident; see the first commit of the branch for an
example.
2026-05-09 14:01:33 +02:00
Stefan Haller 4734bab896 Improve performance of inline status spinner
Now that HandleRender no longer does an implicit Render(), we can use it inside
OnUIThreadContentOnly to save performance, on the assumption that rerendering a
view that contains an inline spinner never changes the layout.
2026-05-09 13:58:33 +02:00
Stefan Haller 76211eea68 Remove Render() from ListContextTrait.HandleRender
self.c.Render() at the end of HandleRender was there to schedule a gocui Update
tick so the view content modified above would actually get drawn. For UI-thread
callers (the great majority -- keybinding handlers, the layout function itself,
popup resize, etc.) this was unnecessary work, since gocui already runs a
layout/redraw cycle after every event. SimpleContext.HandleRender doesn't call
Render() either, so this aligns the two implementations.

The few callers that drove HandleRender from a worker goroutine and relied on
Render() for the flush were wrapped in OnUIThread in the preceding commits, so
the implicit Render is no longer needed.

Also, Render() being called *before* setFooter() looks like it might have been a
theoretical race; this is no longer an issue now.
2026-05-09 13:58:33 +02:00
Stefan Haller 3d324ed7fb Bounce SuggestionsContext.SetSuggestions to UI thread
SetSuggestions has two callers: prepareConfirmationPanel calls it directly on
the UI thread, while editors.promptEditor and
SuggestionsContext.RefreshSuggestions call it via AsyncHandler, which runs the
result closure on a worker goroutine. The worker path currently relies on
HandleRender's self.c.Render() to flush the view update. Wrap the body in
OnUIThread so the worker path stays correct when Render() is removed; for the
UI-thread caller the extra bounce is harmless.
2026-05-09 13:58:33 +02:00
Stefan Haller a364a8d75c Bounce explicit LocalCommits render in refreshBranches to UI thread
refreshBranches runs on a worker goroutine and re-renders the commits view
directly to refresh the branch-head visualization. As with refreshView, this
currently only flushes because HandleRender ends with self.c.Render(). Wrap the
explicit HandleRender call (along with the LocalCommitsMutex pair around it) in
OnUIThread so it keeps working once Render() is removed.
2026-05-09 13:58:33 +02:00
Stefan Haller 0d1caf5c22 Bounce refreshView to the UI thread
An async refresh dispatches refreshXyz on a worker goroutine, which then calls
refreshView -> PostRefreshUpdate -> HandleRender. Today the final
self.c.Render() inside ListContextTrait.HandleRender is what triggers a UI flush
from the worker. We're going to remove that Render() call, so prepare by
wrapping refreshView's body in OnUIThread.

This moves the entire rendering of the view (and the ReApplyFilter/ReApplySearch
stuff) to the UI thread, not just the layout. I don't expect this to make a
difference in practice, and it is already one step towards my long-term goal of
moving all view rendering to the UI thread (see
https://github.com/jesseduffield/lazygit/issues/2974#issuecomment-1729154768).
2026-05-09 13:58:33 +02:00