Commit Graph
100 Commits
Author SHA1 Message Date
Stefan HallerandGitHub 641740fdec Disable the automatic, scheduled release (#5272)
There's too much manual work involved in releasing now (updating
translations, copying docs-master) to make automatic releases
infeasible. I'm not worried that I forget to release on the first
Saturday of every month.

Keeping the code commented out in case we want to re-enable it at some
point.
2026-02-06 19:39:51 +01:00
Stefan Haller bdc780a890 Disable the automatic, scheduled release
There's too much manual work involved in releasing now (updating translations,
copying docs-master) to make automatic releases infeasible. I'm not worried that
I forget to release on the first Saturday of every month.

Keeping the code commented out in case we want to re-enable it at some point.
2026-02-06 19:36:58 +01:00
Stefan HallerandGitHub 443452ad6a Fix rendering of the Reflog panel when using up/down to scroll it (#5248)
This is a regression introduced with #5135. I didn't notice it because I
am using `gui.scrollOffBehavior: jump`, in which case the problem
wouldn't appear; it only happened with `scrollOffBehavior: margin`
(which is the default). In that case, if you used the arrow keys (or
j/k) to move the selection so that the view would start to scroll, empty
space would appear.

Fixes #5235.
2026-01-29 14:26:21 +01:00
Stefan Haller d97531aeef Fix rendering of the Reflog panel when using up/down to scroll it
This is a regression introduced with #5135. I didn't notice it because I am
using `gui.scrollOffBehavior: jump`, in which case the problem wouldn't appear;
it only happened with `scrollOffBehavior: margin` (which is the default). In
that case, if you used the arrow keys (or j/k) to move the selection so that the
view would start to scroll, empty space would appear.
2026-01-29 14:23:16 +01:00
Stefan HallerandGitHub 819212b758 Fix gitignore path collisions (#5245)
### PR Description

Paths added to ignore/exclude files need to be prefixed with a forward
slash to point to a specific file in the directory tree.

Without that prefix a file at root called `file` (added to `.gitignore`
as `file`) would match with `./file` and `./src/file`.

Example flow:
1. User creates a directory called `tests` in root
2. User sees that it's tracked
3. User ignores the directory in Lazygit
4. Changes in `src/tests` are now missing - because `tests` without `/`
matches also directories lower in the tree
2026-01-28 21:12:35 +01:00
Stefan HallerandGitHub be703f3d27 Fix rendering of CRLF sequence ('\r\n') (#5237)
Fixes #5188.
2026-01-28 20:59:56 +01:00
Stefan Haller 06a9ff12ab Bump gocui
This brings in https://github.com/jesseduffield/gocui/pull/98 with the following
fix:

Fix rendering of CRLF sequence ('\r\n')

The FirstGraphemeCluster call returns this as a single character; we want to
treat it the same way as a single \n.

This would be a problem if e.g. a progress bar used \r repeatedly to paint over
the same line, and then printed a \n to move on to the next line; the last pair
of \r and \n was swallowed.

Another scenario where this was a problem was if you stream output of a command
to the log, and the command used \r\n as line feeds. This happens for example
for a background fetch that fails with an error; in that case we print the
combined output (stdout plus stderr) to the log after the command finished, and
for some reason it uses \r\n in that case (I can't actually explain why; when I
do `git fetch --all | xxd` I see only bare \n characters). All output would
appear on one line then.

Also, filter out escape sequences for character set designation; there's nothing
useful we can do with them. In practice, the only one that you are likely to see
is `ESC ( B`, which is sent as part of tput sgr0, which is sometimes used in
scripts to reset all graphics attributes to defaults.
2026-01-28 20:57:09 +01:00
Stefan HallerandGitHub 4c9cc1ab7f When moving commits up/down and the selection leaves the view, scroll to make it visible again (#5247)
This used to work before 0.58, but broke with efd4298b5e (#5134).

Fixes #5244.
2026-01-28 20:47:53 +01:00
Stefan Haller 02997d30d9 When moving commits up/down and the selection leaves the view, scroll to make it visible again
This used to work before 0.58, but broke with efd4298b5e
(#5134).
2026-01-28 20:44:09 +01:00
Stefan HallerandGitHub ce202a5612 Support using the selected commit's message in a fixup (#5233)
### PR Description

I had a spare couple hours so figured I'd whip up a PR for a feature
I've wanted for a while.

I've optimised for muscle memory backwards compatibility here:
- Outside interactive rebase: press 'f' then instead of a confirmation
panel, a menu appears where you can choose to keep the selected commit's
message
- Inside interactive rebase: press 'f' then press 'c' to see the menu
for keeping the message, where if you press 'c' again it will retain the
current message. so 'fcc' is the chord to press.

We're also now showing the -C flag (which is what enables the behaviour)
against the todo.

I've picked the 'c' keybinding because 'C' was taken and it corresponds
to the flag. Previously that showed a warning about a change in
keybinding for cherry picking but it's been ages since we've made that
change so I'm happy to retire it.
2026-01-28 10:31:47 +01:00
Stefan HallerandGitHub 39cd4746d5 Limit popup panel widths to a maximum width (#5231)
On very large screens they would get ridiculously wide.

The limits we chose here are a little arbitrary:
- 80 for confirmations and prompts
- 90 for menus
- auto-wrap width plus 25 for the commit message editor (or 100 if
auto-wrap is off)
2026-01-28 09:04:30 +01:00
Stefan Haller 1ede4e6eb9 Limit popup panel widths to a maximum width
On very large screens they would get ridiculously wide.

The limits we chose here are a little arbitrary:
- 80 for confirmations and prompts
- 90 for menus
- auto-wrap width plus 25 for the commit message editor (or 100 if auto-wrap is
  off)
2026-01-28 09:02:27 +01:00
Stefan HallerandGitHub 4c731abedd Fix opening a menu when a previous menu was scrolled down (#5238)
To reproduce: open the keybindings menu ('?'), press '>' to select the
last line, esc to close it, open it again. The view would appear still
scrolled down, so the selected first line was out of view. Even worse,
if you open a different, shorter menu (e.g. the "View upstream reset
options..." menu in the Files panel), you'd only see the Cancel item,
the other ones were scrolled out of view.

This is a regression introduced with efd4298b5e (#5134).
2026-01-25 16:21:22 +01:00
Stefan Haller c10dfcefcf Fix opening a menu when a previous menu was scrolled down
To reproduce: open the keybindings menu ('?'), press '>' to select the last
line, esc to close it, open it again. The view would appear still scrolled down,
so the selected first line was out of view. Even worse, if you open a different,
shorter menu (e.g. the "View upstream reset options..." menu in the Files
panel), you'd only see the Cancel item, the other ones were scrolled out of
view.

This is a regression introduced with efd4298b5e (#5134).
2026-01-25 16:17:13 +01:00
Stefan HallerandGitHub 50b5c17d93 Don't log the "git rev-list" call when marking bisect commits (#5236)
When marking commits as good or bad during a bisect, a "git rev-list"
call would appear in the Command log. This is confusing, it's an
internal detail that is not interesting for the user to see.
2026-01-25 11:50:21 +01:00
Stefan Haller 8d36c8b3c1 Don't log the "git rev-list" call when marking bisect commits
When marking commits as good or bad during a bisect, a "git rev-list" call would
appear in the Command log. This is confusing, it's an internal detail that is
not interesting for the user to see.
2026-01-25 11:47:07 +01:00
Stefan HallerandGitHub 9f44caa568 Exclude commit trailers from line wrapping (#5230)
Bump gocui, which brings in
https://github.com/jesseduffield/gocui/pull/97.

#Fixes #5216.
2026-01-25 11:25:21 +01:00
Stefan Haller 39477172b8 Bump gocui
This brings in https://github.com/jesseduffield/gocui/pull/97 ("Exclude commit
trailers from line wrapping").
2026-01-25 11:23:05 +01:00
Stefan HallerandGitHub 7545fc48e5 chore: Update outdated GitHub Actions versions (#5220)
### PR Description

- Updated `actions/github-script` from `v7` to `v8` in
`.github/workflows/close-issues.yml`
- Updated `actions/setup-go` from `v5` to `v6` in
`.github/workflows/release.yml`
- Updated `golangci/golangci-lint-action` from `v8` to `v9` in
`.github/workflows/ci.yml`
- Updated `actions/checkout` from `v4` to `v6` in
`.github/workflows/codespell.yml`
- Updated `actions/checkout` from `v4` to `v6` in
`.github/workflows/release.yml`
- Updated `peter-evans/create-pull-request` from `v7` to `v8` in
`.github/workflows/sponsors.yml`
- Updated `actions/download-artifact` from `v4` to `v7` in
`.github/workflows/ci.yml`
- Updated `actions/checkout` from `v4` to `v6` in
`.github/workflows/ci.yml`
- Updated `actions/checkout` from `v4` to `v6` in
`.github/workflows/sponsors.yml`
- Updated `actions/setup-go` from `v5` to `v6` in
`.github/workflows/ci.yml`

The changes ensure that the GitHub Action workflows are using the latest
versions of the actions, which include improved functionality and
compatibility. These updates will be tested in the CI pipeline of the
pull request.
2026-01-24 16:28:57 +01:00
Stefan HallerandGitHub 11e877cbad Have "Find base commit for fixup" ignore fixup commits for the found base commit (#5210)
If the ctrl-f function (Find base commit for fixup) finds a base commit
plus a bunch of fixup! commits for that base commit, it ignores those
fixups and selects the base commit. For the purpose of creating another
fixup commit on top this is always what you want, so I'm doing this
without adding a confirmation. If the user presses shift-A after that to
amend their changes though, they are guaranteed to get conflicts, so for
that case a warning might be useful; however, I find it unlikely that
users will want to amend changes to a commit that they already created
fixups for, so I'm just hoping that this won't happen in practice.

This implementation is a bit stricter than #5201, in that it only
ignores fixups if the first found commit is not a fixup itself; because
if it is, it's not clear whether the user wants to create another fixup
for both on top, or amend the changes into each one, in which case they
need to be staged individually.
2026-01-24 16:06:38 +01:00
Stefan Haller 268d1934f8 Ignore fixup commits for a found base commit when doing ctrl-f 2026-01-24 16:04:35 +01:00
Stefan Haller 4bcf3e181c Extract a helper method getCommitsForHashes 2026-01-24 16:04:35 +01:00
Stefan Haller df1e5512da Make getHashesAndSubjects a free-standing function
There's no reason for this to be a method.
2026-01-24 16:04:35 +01:00
Stefan Haller 2ba3c1dc3f Move isFixupCommit to FixupHelper 2026-01-24 16:04:35 +01:00
Stefan Haller b41bb8f845 Add a test that documents the current behavior
Currently we get an annoying error message, but we'd like the base commit to be
selected, disregarding the fixup.
2026-01-24 16:04:35 +01:00
Stefan HallerandGitHub 19605ad476 Update devcontainer VARIANT to 1-trixie (#5204)
### PR Description

The previous `1-bullseye` did not have the required go version 1.25.0
2026-01-17 11:59:37 +01:00
Stefan HallerandGitHub 4486c86271 Fix rendering artefacts after double-width characters (e.g. "⚠️") on some terminals (#5198)
Fixes
https://github.com/jesseduffield/lazygit/issues/5171#issuecomment-3710757175.
2026-01-12 10:02:27 +01:00
Stefan Haller b44a369295 Bump tcell
This fixes rendering artefacts after double-width characters such as "⚠️" on
some terminals.
2026-01-12 09:57:50 +01:00
Stefan HallerandGitHub 498bc457fc Don't log the "git ls-remote" call when opening a PR (#5195)
When opening a PR, a "git ls-remote" call would appear in the Command
log. This is confusing, it's an internal detail that is not interesting
for the user to see.
2026-01-11 20:04:54 +01:00
Stefan Haller 7f957f059b Don't log the "git ls-remote" call when opening a PR
When opening a PR, a "git ls-remote" call would appear in the Command log. This
is confusing, it's an internal detail that is not interesting for the user to
see.
2026-01-11 20:02:08 +01:00
Stefan HallerandGitHub 1a4af359ec Request info about terminal in issue template (#5194)
For some types of bugs it can be relevant what terminal is being used,
so ask users to provide this information when they file an issue.
2026-01-11 20:00:34 +01:00
Stefan Haller f16bec2ce3 Ask users to provide information about their terminal 2026-01-11 19:56:47 +01:00
Stefan Haller 798fe4a1ef Remove git version
It's unnecessary to ask users to provide this; the output of `lazygit --version`
contains it already.
2026-01-11 19:56:47 +01:00
Stefan HallerandGitHub bb2e5fa886 Update tcell dependency (#5192)
This provides two fixes:
- proper handling of keypad keys on certain terminals (e.g. iTerm2)
- fix problems pasting certain emojis or east asian text on Windows
Terminal

Fixes #5171
Fixes #5173
2026-01-11 18:30:51 +01:00
Stefan Haller 3067ff1cac bump tcell
This provides two fixes:
- proper handling of keypad keys on certain terminals (e.g. iTerm2)
- fix problems pasting certain emojis or east asian text on Windows Terminal
2026-01-11 18:15:54 +01:00
Stefan HallerandGitHub 312feff130 Fix pasting multi-line text into the commit description (#5186)
This fixes a regression in 0.58.

Fixes #5181.
2026-01-11 18:10:17 +01:00
Stefan Haller ee60102fdc Bump gocui
This fixes pasting multi-line text into the commit message editor; see
https://github.com/jesseduffield/gocui/pull/96.
2026-01-11 18:07:30 +01:00
Stefan HallerandGitHub 7b969a03ad When doing ctrl-f, and the resulting commit is not visible, scroll it into view (#5182)
This used to work in the last version, but broke with efd4298b5e
(#5134).
2026-01-11 18:01:54 +01:00
Stefan Haller 1f7e5d7767 When doing ctrl-f, and the resulting commit is not visible, scroll it into view
This used to work in the last version, but broke with efd4298b5e (#5134).
2026-01-06 16:17:33 +01:00
Stefan HallerandGitHub 80dd695d7a Update search position (match x of y) when changing the selection in a list view (#5169)
When searching (not filtering) in a list view using `/`, moving the
selection now updates the "x of y" indicator of the search results to
the last one before the selection. Pressing `n` again searches from
there rather than from the previously shown result.

Also see corresponding gocui PR at
https://github.com/jesseduffield/gocui/pull/95.
2026-01-04 18:54:28 +01:00
Stefan Haller 65edd99fd0 Update search position (match x of y) when changing the selection in a list view
or in the staging view.
2026-01-04 18:51:45 +01:00
Stefan Haller 98bf8f86d1 Bump gocui and adapt code accordingly 2026-01-04 18:48:47 +01:00
Stefan HallerandGitHub a0e81c93b8 Update docs and schema for release (#5168) 2026-01-03 20:23:27 +01:00
Stefan Haller 7d142df9c2 Update docs and schema for release 2026-01-03 20:20:10 +01:00
Stefan HallerandGitHub 0bd411111c Update translations from Crowdin (#5167) 2026-01-03 20:19:38 +01:00
Stefan Haller 463e81f197 Update translations from Crowdin 2026-01-03 20:15:07 +01:00
Stefan HallerandGitHub 810f6b22d2 Show an error when checking out a file would overwrite local modifications (#5154)
Checking out a file discards all local modifications to that file;
checking out a directory discards modifications to all files in that
directory. This can result in lost work if the user isn't aware of this.

Instead of showing a confirmation (to which the user might press enter
too hastily, still losing their work), or showing a menu with
auto-stash/discard options, we simply show an error. The assumption is
that this is an unusual situation that users won't run into often, and
if they do, it's easy enough to manually address it by stashing or
discarding the changes as appropriate.

Fixes #5142.
2026-01-03 20:11:51 +01:00
Stefan Haller 3ccd33b388 Show an error when checking out a file would overwrite local modifications 2026-01-03 20:09:55 +01:00
Stefan HallerandGitHub d34266d5e6 Bump gocui (#5166)
Adds https://github.com/jesseduffield/gocui/pull/93 and
https://github.com/jesseduffield/gocui/pull/94.
2026-01-03 14:45:18 +01:00
Stefan Haller c0b6f4adb9 Bump gocui 2026-01-03 14:39:03 +01:00
Stefan HallerandGitHub 72fa54d4d5 Add a note about delta's --navigate option not working in lazygit (#5155)
Addresses #5136.
2026-01-01 14:38:24 +01:00
Stefan Haller f68f027bcc Add a note about delta's --navigate option not working in lazygit 2026-01-01 14:34:54 +01:00
Stefan HallerandGitHub 9e455f427c Fix rendering of certain emojis (#5116)
This bumps our gocui dependency, which recently learned to render
multi-rune grapheme clusters properly. This fixes rendering of a lot of
emojis such as ️ or 🏴󠁧󠁢󠁥󠁮󠁧󠁿.

Fixes #4854
Fixes #4347
Fixes #3811
Fixes #3711
Fixes #3606
Fixes #3514
Fixes #2702
Fixes #2409
2025-12-23 16:55:47 +01:00
Stefan Haller bb816d7001 Call gocui's SimpleEditor instead of duplicating its code 2025-12-23 16:49:16 +01:00
Stefan Haller 5423e7459c Replace go-runewidth with uniseg 2025-12-23 16:49:16 +01:00
Stefan Haller fec7e9ce61 Bump gocui (and tcell)
and adapt lazygit's client code accordingly.
2025-12-23 16:49:16 +01:00
Stefan HallerandGitHub 32207d25c2 Fix annoying UI stalls after refresh (e.g. background fetch) when the reflog is very long (#5135)
Draw only the visible lines of the reflogs panel, like we do for
commits.

Since the reflog can get very long, this saves some memory but
especially some UI thread lag. In one of my repos I had over 11'000
reflog entries (I guess I should prune them more regularly...), and
rendering them took ~600ms; since this happens on the UI thread, there
was an annoying stall for half a second after every background fetch,
for example (even if the reflog panel is not visible).
2025-12-23 16:23:00 +01:00
Stefan Haller 84be082fb5 Draw only visible part of the reflogs panel
Since the reflog can get very long, this saves some memory but especially some
UI thread lag. In one of my repos I had over 11'000 reflog entries (I guess I
should prune them more regularly...), and rendering them took ~600ms; since this
happens on the UI thread, there was an annoying stall for half a second after
every background fetch, for example.
2025-12-23 16:20:32 +01:00
Stefan Haller f7d4efc59e Rerender visible lines when scrolling by page
This fixes a bug in ListContextTrait.FocusLine whereby the view would go blank
when scrolling by page (using ',' or '.') in views that have
renderOnlyVisibleLines set to true but refreshViewportOnChange set to false.
Currently we don't have any such views; the only ones who use
renderOnlyVisibleLines are commits and subcommits, and they also use
refreshViewportOnChange. However, we are going to add one in the next commit,
and eventually it might be a good idea to convert all our list views to that by
default, and get rid of the renderOnlyVisibleLines flag.
2025-12-23 16:20:32 +01:00
Stefan Haller b4b21f9c65 Fix race condition in HandleRender
Move SetContentLineCount into OverwriteLinesAndClearEverythingElse. Calling it
separately beforehand is not concurrency safe; we need both to happen
when the view's writeMutex is locked.
2025-12-23 16:20:32 +01:00
Stefan HallerandGitHub e1a8327583 Avoid scrolling the selection into view on refresh (#5134)
It is possible to scroll the selection out of view using the mouse
wheel; after doing this, it would sometimes scroll into view by itself
again, for example when a background fetch occurred. In the files panel
this would even happen every 10s with every regular files refresh.

Fix this by adding a scrollIntoView parameter to HandleFocus, which is
false by default, and is only set to true from controllers that change
the selection.

Fixes #5097.
2025-12-23 15:37:18 +01:00
Stefan Haller 478d51c83e When pressing up or down, scroll selection into view if it is outside, even if it didn't change
We have this logic to avoid constantly rerendering the main view when hitting
up-arrow when you are already at the top of the list. That's good, but we do
want to scroll the selection into view if it is outside and you hit up or down,
no matter if it changed.
2025-12-23 15:34:38 +01:00
Stefan Haller efd4298b5e Avoid scrolling the selection into view on refresh
It is possible to scroll the selection out of view using the mouse wheel; after
doing this, it would sometimes scroll into view by itself again, for example
when a background fetch occurred. In the files panel this would even happen
every 10s with every regular files refresh.

Fix this by adding a scrollIntoView parameter to HandleFocus, which is false by
default, and is only set to true from controllers that change the selection.
2025-12-23 15:34:38 +01:00
Stefan Haller 37bc0dfc44 Extract a method for selecting the first branch (and first commit)
We want to do this whenever we switch branches; it wasn't done consistently
though. There are many different ways to switch branches, and only some of these
would reset the selection of all three panels (branches, commits, and reflog).
2025-12-23 15:08:08 +01:00
Stefan HallerandGitHub 74b1255b4b Fix the main view display after reverting a commit (#5138)
After reverting a commit, the main view would show the diff of a commit
that is not the selected one.
2025-12-23 14:59:28 +01:00
Stefan Haller a415d1b529 Fix the main view display after reverting a commit
We move the selection down by the number of commits that were reverted (to keep
the same commits selected). However, this only happens after refreshing, which
has rendered the main view with the wrong commit, so we need to render it again
after moving the selection.

There are many other callers of MoveSelection in LocalCommitsController, but all
of them happen before the refresh. Revert is special because it needs to move
the selection after refreshing, e.g. when reverting the only commit of a branch.
2025-12-23 14:55:58 +01:00
Stefan Haller 0a48f307b1 Add test expectation showing a problem with revert
After the revert, the main view shows the diff of the wrong commit.
2025-12-23 14:48:58 +01:00
Stefan HallerandGitHub cf873b16d9 Prevent many hyperlinks from launching while mouse moving (#5133)
Update our gocui dependency, which brings in the fix that was made
there; see https://github.com/jesseduffield/gocui/pull/86.

(Fix by `Chris McDonnell <c.a.mcdonn@gmail.com>`)
2025-12-22 16:28:42 +01:00
Stefan HallerandChris McDonnell 2189c3b43a Bump gocui
This brings in the fix "Prevent many hyperlinks from launching while mouse
moving".

Co-authored-by: Chris McDonnell <c.a.mcdonn@gmail.com>
2025-12-22 16:22:36 +01:00
Stefan HallerandGitHub e7b69bcf24 Support custom keybindings in custom command menu prompts (#5129)
## Summary
resolves: #3626

This adds support for keybindings on menu options.

### Example Usage:
```yml
customCommands:
  - key: 'e'
    context: 'files'
    command: 'echo {{.Form.Choice | quote}} > result.txt'
    prompts:
      - type: 'menu'
        title: 'Choose an option'
        key: 'Choice'
        options:
          - value: 'foo'
            description: 'FOO'
            key: 'f'
          - value: 'bar'
            description: 'BAR'
            key: 'b'
```

### Please check if the PR fulfills these requirements

* [x] Cheatsheets are up-to-date (run `go generate ./...`)
* [x] Code has been formatted (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting))
* [x] Tests have been added/updated (see
[here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md)
for the integration test guide)
* [x] Text is internationalised (see
[here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation))
* [x] If a new UserConfig entry was added, make sure it can be
hot-reloaded (see
[here](https://github.com/jesseduffield/lazygit/blob/master/docs/dev/Codebase_Guide.md#using-userconfig))
* [x] Docs have been updated if necessary
* [x] You've read through your own file changes for silly mistakes etc
2025-12-22 14:24:29 +01:00
Stefan HallerandGitHub 262e7f4e79 Change keybinding of "keep" item in Merge Conflict menu back to 'k' (#5132)
Now that we can use 'k' as a menu item binding (this was fixed in
#5131), use it for the "keep" entry in the merge menu. I don't think
this will be a problem for people's muscle memory, given that this menu
is not encountered every day; and it's simply the better keybinding.

This reverts commit b32b55201e.
2025-12-22 09:51:26 +01:00
Stefan Haller 6043eb52db Revert "Update resolve conflict using p instead of k"
Now that we can use 'k' as a menu item binding (this was fixed in #5131), use it
for the "keep" entry in the merge menu. I don't think this will be a problem for
people's muscle memory, given that this menu is not encountered every day; and
it's simply the better keybinding.

This reverts commit b32b55201e.
2025-12-22 09:49:04 +01:00
Stefan HallerandGitHub 70fe7bd1b4 Allow using 'j', 'k', 'H', or 'L' as keybindings in custom command menus (#5131)
Previously they would be shown as keybindings in the menu, but they
didn't work because their builtin functionality (select next/prev line,
scroll view left/right) would take precedence.

This will allow us to revert #4934; doing that in a separate PR, see
#5132.
2025-12-22 09:48:38 +01:00
Stefan Haller 344d3866a6 Make menu keybindings take precedence over builtin ones, except for confirm/esc
This makes it possible to use 'j', 'k', 'H' or 'L' as menu item keybindings.
2025-12-22 09:37:06 +01:00
Stefan Haller f996e47199 Rename KeepConfirmKeybindings to KeepConflictingKeybindings
After the change in the previous commit this expresses better what it is about.
2025-12-22 09:37:06 +01:00
Stefan Haller 7e3b24d496 In menus, remove not just the confirm binding, but also esc and up/down
This is not really super important because we are very unlikely to assign a key
such as esc or up/down to a menu item. However, users might do this in a custom
commands menu, and in that case it is important that the builtin keys still
work; or they might remap those builtin commands to other keys, in which case
they might conflict with single-letter keys in normal menus.
2025-12-22 09:37:06 +01:00
Stefan Haller e19544a42b Add a test that demonstrates problems with custom menu keybindings
The test shows two problems: a <down> keybinding is not removed from a menu item
(the 'y' binding is removed though, which is correct), and keybindings such as
'j' and 'H' don't work. We will fix both of these separately in the following
commits.
2025-12-22 09:37:06 +01:00
Stefan HallerandGitHub b7a24c8298 feat: add Codeberg as a supported git hosting service (#5130)
Thank you for an awesome tool. I wanted to add support for codeberg.
Tested locally that opening pull-request works

### PR Description

Codeberg is a Gitea-based git hosting service that uses the same URL
patterns for pull requests and commits but differs on its hostname
2025-12-21 14:13:20 +01:00
Stefan HallerandGitHub 3201695658 feat: add keys for command log menu items (#5096) 2025-12-14 17:14:50 +01:00
Stefan HallerandGitHub 8651c46e14 Fix small issues with the Breaking Changes texts (#5114) 2025-12-11 21:13:30 +01:00
Stefan Haller 46c095cc29 Add a missing quote 2025-12-11 21:10:11 +01:00
Stefan Haller 9aa268c1f4 Cleanup: use spaces instead of tab 2025-12-11 21:09:57 +01:00
Stefan HallerandGitHub 6600adf671 Remove confirmation for opening the merge tool (#5094)
The confirmation used to make sense back when the Open MergeTool command
was its own top-level command; however, that command was changed in
#4889 to open a menu instead, and Open MergeTool is now just a submenu
entry in that menu, so it no longer needs a confirmation.

Fixes #5093.
2025-12-08 09:48:58 +01:00
Stefan Haller f6cba966d0 Remove confirmation for opening the merge tool
The confirmation used to make sense back when the Open MergeTool command was its
own top-level command; however, that command was changed in 703f053a7e to open a
menu instead, and Open MergeTool is now just a submenu entry in that menu, so it
no longer needs a confirmation.
2025-12-07 20:55:25 +01:00
Stefan HallerandGitHub 17d03ec8cb Update docs and schema for release (#5091) 2025-12-06 13:58:23 +01:00
Stefan Haller da4494fb06 Update docs and schema for release 2025-12-06 13:49:02 +01:00
Stefan HallerandGitHub 8ced11b5ae README.md: Update Sponsors (#5055)
Automated changes by
[create-pull-request](https://github.com/peter-evans/create-pull-request)
GitHub action
2025-12-06 13:48:26 +01:00
Stefan HallerandGitHub 17c6a895b4 Update translations from Crowdin (#5090) 2025-12-06 13:30:13 +01:00
Stefan Haller 6fbf64b70e Update translations from Crowdin 2025-12-06 13:28:19 +01:00
Stefan HallerandGitHub cc96d8cede Fix to support creating MRs for repositories cloned with SSH alias (#5082)
### PR Description

Use case: some repositories are cloned with a full SSH alias (without a
user). E.g. in `.ssh/config` you have

```
Host gitlab
    HostName gitlab.com
    User git
    IdentityFile ...
```

and then you clone with `git clone gitlab:foo/bar`

According to the docs, you can add a service to `config.yaml` and it
should work:

```yaml
services:
  gitlab: 'gitlab:gitlab.com'
```

But currently it doesn't because lazygit expects all remote URLs to have
a user. This can be fixed by the user by changing the URL to e.g.
`git@gitlab:foo/bar`, but it breaks the user flow and is quite
unexpected.

This PR changes `defaultUrlRegexStrings` and makes the `user@` part of
the remote URL optional. Fixes the issue for Github and Gitlab which use
the default regexes.
2025-12-06 11:58:44 +01:00
Stefan HallerandGitHub 0fc8cb35a8 chore: fix function name in comment (#4481) 2025-12-06 11:45:51 +01:00
Stefan HallerandGitHub 06426b2107 refactor: use strings.Builder and strings.Repeat to simplify code (#5068)
### PR Description

strings.Builder has fewer memory allocations and better performance.
More info: [golang/go#75190](https://github.com/golang/go/issues/75190)
2025-12-03 18:39:11 +01:00
Stefan HallerandGitHub 8396747cf1 Band-aid fix for rare crashes when refreshing files (#5074)
Users have filed issues with crash reports that seem to indicate that
the FileTreeViewModel gets swapped out (by a refresh) while a call to
itemsSelected is in progress, iterating over the previous items. Guard
against this by locking the mutex that we already have for this for the
duration of the call.

I don't have a good way of testing whether the fix helps, because the
crashes only occurred very infrequently. Let's just see if the crash
reports stop coming in after we ship this.

Note also that this is only the minimal fix for the crashes that were
reported. Theoretically, the same problem could happen for a key handler
itself, but we never saw reports about that, so we don't bother doing
anything about that yet.

Note also that long-term I envision a different solution to this class
of problems (discussed in
https://github.com/jesseduffield/lazygit/issues/2974), that's why I want
to avoid locking mutexes more than necessary now.

Fixes #3646 
Fixes #4154
Fixes #4301
Fixes #5070
2025-12-03 08:10:13 +01:00
Stefan Haller d274474c61 Band-aid fix for rare crashes when refreshing files
Users have filed issues with crash reports that seem to indicate that the
FileTreeViewModel gets swapped out (by a refresh) while a call to itemsSelected
is in progress, iterating over the previous items. Guard against this by locking
the mutex that we already have for this for the duration of the call.

I don't have a good way of testing whether the fix helps, because the crashes
only occurred very infrequently. Let's just see if the crash reports stop coming
in after we ship this.

Note also that this is only the minimal fix for the crashes that were reported.
Theoretically, the same problem could happen for a key handler itself, but we
never saw reports about that, so we don't bother doing anything about that yet.

Note also that long-term I envision a different solution to this class of
problems (discussed in https://github.com/jesseduffield/lazygit/issues/2974),
that's why I want to avoid locking mutexes more than necessary now.
2025-12-03 08:08:21 +01:00
Stefan HallerandGitHub d1d2bb23b6 Show fixup base commits in correct order in ctrl-f error message (#5073)
If the ctrl-f command ("Find base commit for fixup") finds multiple
candidates, it lists them all in an error message. Previously they were
listed in random order in the error message, which can be confusing;
it's nicer to see them in the same order in which they appear in the
commit log.

Fixes #5071.
2025-11-30 14:08:22 +01:00
Stefan Haller 26453b26cf Remove unused function GetHashesAndCommitMessagesFirstLine 2025-11-30 14:06:31 +01:00
Stefan Haller e2b3601c57 Fix order of fixup base commits shown in ctrl-f error message 2025-11-30 14:06:31 +01:00
Stefan Haller c16b4b1d2e Make find_base_commit_for_fixup tests more specific
We want to test the order in which the commits are listed in the error message.
For one of the tests the order is already as we want it, but for the other it's
not (we want them to show up in log order). We'll fix this in the next commit.
2025-11-30 14:06:31 +01:00
Stefan HallerandGitHub 28cd1c2df4 Don't use "HEADLESS" environment variable for running tests (#5064)
It is a bit generic, it seems that users sometimes set it for other
reasons (see
https://github.com/jesseduffield/lazygit/issues/5030#issuecomment-3541000735),
and then they are confused why they don't see anything. Use a more
specific name instead.
2025-11-28 12:09:17 +01:00
Stefan Haller 9334bf0333 Don't use "HEADLESS" environment variable for running tests
It is a bit generic, it seems that users sometimes set it for other reasons, and
then they are confused why they don't see anything. Use a more specific name
instead.
2025-11-28 12:06:42 +01:00