jesseduffield.lazygit/pkg/integration/tests
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
..
bisect Deprecate git.log.showGraph and git.log.order config 2024-02-16 13:23:35 +01:00
branch Use ErrorToast instead of error panel when invoking a disabled command 2024-01-14 17:45:35 +01:00
cherry_pick Deprecate git.log.showGraph and git.log.order config 2024-02-16 13:23:35 +01:00
commit Make it easy to create "amend!" commits 2024-03-22 08:27:45 +01:00
config Support matchers on integers in integration tests 2023-06-03 15:32:23 +10:00
conflicts Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
custom_commands Fix order problems when saving custom commands history 2024-02-16 13:31:37 +01:00
demo Update interactive rebase demo 2024-03-23 20:45:51 +11:00
diff Add busy count for integration tests 2023-07-08 22:54:52 +10:00
file Support range select for staging/discarding files 2024-01-25 11:34:59 +11:00
filter_and_search Fix crash when filtering the keybindings menu 2024-03-28 09:58:45 +01:00
filter_by_author Add author filtering to commit view 2024-02-21 09:58:09 +01:00
filter_by_path Pass -f as single arg in integration test 2024-01-12 20:19:50 +11:00
interactive_rebase Fix deleting update-ref todos 2024-03-26 22:29:56 +01:00
misc Change CopiedToClipboard text to start lower-case 2024-03-22 09:59:46 +01:00
patch_building Add integration test 2024-02-18 15:24:09 +01:00
reflog Deprecate git.log.showGraph and git.log.order config 2024-02-16 13:23:35 +01:00
shared Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
staging Add range selection ability on list contexts 2024-01-19 10:47:21 +11:00
stash feat: add age on stash lines 2023-12-27 11:21:49 +01:00
submodule Show all submodules recursively 2024-03-07 20:16:28 +01:00
sync Keep same branch selected when refreshing branches 2024-01-19 09:25:07 +01:00
tag Make it possible to handle toasts in integration tests 2024-01-14 17:42:03 +01:00
ui Show mode-specific keybinding suggestions 2024-01-28 08:33:13 +11:00
undo Support range select in rebase actions 2024-01-23 17:23:56 +11:00
worktree Support range select for staging/discarding files 2024-01-25 11:34:59 +11:00
test_list.go Fix crash when filtering the keybindings menu 2024-03-28 09:58:45 +01:00
test_list_generator.go Make test_list_generator.go print what it's doing 2023-09-29 20:40:15 +02:00
tests.go Set working directory in lazygit test command 2024-01-12 19:59:31 +11:00