1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-11-24 08:52:21 +02:00
lazygit/pkg
Stefan Haller 0b70dfbf46 Fix crash when filtering the keybindings menu
It would crash when some keybindings are set to null, and the filter string is
such that only those keybindings remain visible.

The reason for the crash is that when inserting non-model items (menu section
headers in this case) you specify a column to align them to. This works on the
assumption that the number of columns is always the same. It can cope with the
case that columns are removed because they are empty for all items; but it can't
cope with the case that the getDisplayStrings function returns a lower number of
columns.

And this is what happened here: MenuViewModel.GetDisplayStrings would omit the
keybinding column when none of the entries have a keybinding. This logic is
unnecessary, the generic list rendering mechanism takes care of this, so
removing this logic fixes the crash.

We do have to make sure though that the column is really empty when there's no
keybinding, so change the logic to use FgCyan only when there's a keybinding.
2024-03-28 09:58:45 +01:00
..
app Fix deleting update-ref todos 2024-03-26 22:29:56 +01:00
cheatsheet Render keybinding cheatsheet as markdown table 2024-01-28 08:12:01 +11:00
commands Fix deleting update-ref todos 2024-03-26 22:29:56 +01:00
common Add AppState to common.Common 2023-09-04 17:48:39 +02:00
config Fix container detection 2024-03-22 13:42:15 +01:00
constants Make the links in the status panel point to the current version rather than master 2024-03-22 08:13:59 +01:00
env Support bare worktrees where worktree does not have its own .git file 2023-08-07 22:40:53 +10:00
fakes cleanup integration test code 2023-02-26 12:54:13 +11:00
gui Fix crash when filtering the keybindings menu 2024-03-28 09:58:45 +01:00
i18n Change CopiedToClipboard text to start lower-case 2024-03-22 09:59:46 +01:00
integration Fix crash when filtering the keybindings menu 2024-03-28 09:58:45 +01:00
jsonschema Add UserConfig jsonschema generation script 2023-12-02 10:46:24 +01:00
logs Remove secureexec package 2023-07-30 19:59:51 +10:00
snake integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
tasks Refactor repo_paths.go to use git rev-parse 2024-01-24 08:40:01 +01:00
theme Standardise display of range selection across views 2024-01-19 10:47:21 +11:00
updates Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
utils Fix deleting update-ref todos 2024-03-26 22:29:56 +01:00