jesseduffield.lazygit/pkg/integration/tests/custom_commands
Stefan Haller 6c6201ab04 Fix order problems when saving custom commands history
This fixes two problems:
- each time the custom commands panel was opened, the history of commands would
  be shown in reversed order compared to last time. (The reason is that
  lo.Reverse modifies the slice in place rather than just returning a new,
  reversed slice.)
- when executing a previous command again (either by typing it in again, or by
  picking it from the history), it should move to the beginning of the history,
  but didn't.

We fix this by storing the history in reversed order (as the user sees it in
the panel), this makes the logic simpler. We just have to prepend rather
than append newly added commands now.

While this is theoretically a breaking change, it's not worth bothering because
the order was wrong for existing users in 50% of the cases anyway.
2024-02-16 13:31:37 +01:00
..
basic_cmd_at_runtime.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
basic_cmd_from_config.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
check_for_conflicts.go Allow checking for merge conflicts after running a custom command 2023-07-13 18:40:34 +10:00
complex_cmd_at_runtime.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
form_prompts.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
history.go Fix order problems when saving custom commands history 2024-02-16 13:31:37 +01:00
menu_from_command.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
menu_from_commands_output.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
multiple_prompts.go Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
omit_from_history.go Use sentence case everywhere 2023-05-25 23:52:19 +10:00
suggestions_command.go Keep same branch selected when refreshing branches 2024-01-19 09:25:07 +01:00
suggestions_preset.go Keep same branch selected when refreshing branches 2024-01-19 09:25:07 +01:00