-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
Describe the bug
User customisation of the keybinding for p (lowercase) – i.e. using p for another action or unbinding p by mapping it to <disabled> – is ignored when the commit log is active.
Instead of obeying the user's keybindings, lazygit falls back to the default built-in behaviour which appears to be git pull --no-edit.
To Reproduce
-
Customise the key map, thus:
keybinding: universal: pushFiles: <disabled>
-
In
lazygit, focus the commit log and have a commit in the list selected. -
Strike
p(lowercase, no modifiers) -
Observe that
lazygitfalls back togit pull --no-editwhich is not the configured behaviour. -
Change to the branches, remotes or tags pane and try striking
p; observe thatlazygitobeys its configuration.
Expected behavior
lazygit should heed user keybinding preferences – consistently – throughout the U.I.
Version info:
commit=, build date=, build source=unknown, version=0.51.1, os=linux, arch=amd64, git version=2.49.0Additional Details
-
If the commits window is not active (another
lazygitpane has focus) then it appears thatpwill behave as configured. -
Mapping
pto another action appears to exhibit the same incorrect behaviour. For example, I discovered this issue because I wished to swappandP(to be push and pull, respectively, instead of the default) but this is presently impossible because the following does not work, consistently:keybinding: universal: pullFiles: p pushFiles: P
- but this config does work for the branches pane, remotes or tags, too.
-
The mapping for
branches: pushTag:appears to have no bearing on this behaviour and mapping that to<disabled>does not resolve the issue. (grepfound no other mentions of push or pull in the default keybindings as far as I could tell.)