1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-02 09:21:40 +02:00
lazygit/pkg/gui/types
Jesse Duffield 0f9d9e13d1 Show mode-specific keybinding suggestions
As part of making lazygit more discoverable, there are certain keys which you almost certainly
need to press when you're in a given mode e.g. 'v' to paste commits when cherry-picking. This
commit prominently shows these keybinding suggestions alongside the others in the option view.

I'm using the same colours for these keybindings as is associated with the mode elsewhere e.g.
yellow for rebasing and cyan for cherry-picking. The cherry-picking one is a bit weird because
we also use cyan text to show loaders and app status at the bottom left so it may be confusing,
but I haven't personally found it awkward from having tested it out myself.

Previously we would render these options whenever a new context was activated, but now that we
need to re-render options whenever a mode changes, I'm instead rendering them on each screen
re-render (i.e. in the layout function). Given how cheap it is to render this text, I think
it's fine performance-wise.
2024-01-28 08:33:13 +11:00
..
common_commands.go start moving commit panel handlers into controller 2022-03-17 19:13:40 +11:00
common.go Use inline status for fetching remotes 2024-01-26 08:29:04 +01:00
context.go Set groundwork for better disabled reasons with range select 2024-01-23 13:03:37 +11:00
keybindings.go Show mode-specific keybinding suggestions 2024-01-28 08:33:13 +11:00
modes.go Add a "Mark commit as base commit for rebase" command 2023-07-31 08:41:41 +02:00
ref.go fix: fix ambiguous refname 2022-05-13 21:05:51 +09:00
refresh.go Keep same branch selected when refreshing branches 2024-01-19 09:25:07 +01:00
rendering.go Visualize the "ignore whitespace" state in the subtitle of the diff view 2023-05-20 12:58:32 +10:00
search_state.go Add search history 2023-09-20 08:35:41 +03:00
suggestion.go Set groundwork for better disabled reasons with range select 2024-01-23 13:03:37 +11:00
views.go Layout the bottom line view using spacer views 2023-12-09 11:18:28 +01:00