1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-06-15 00:15:32 +02:00
Commit Graph

25 Commits

Author SHA1 Message Date
198ead7c14 Extract a ListRenderer struct
I'm doing this not so much because it's a great abstraction, but just because it
will make it much easier to write tests for it.
2023-08-28 14:21:06 +02:00
061bfce835 Change length parameter of getDisplayStrings to endIdx
It's more natural to work with this way, as we will see later in this branch.
2023-08-28 14:21:06 +02:00
e33fe37a99 Standardise on using lo for slice functions
We've been sometimes using lo and sometimes using my slices package, and we need to pick one
for consistency. Lo is more extensive and better maintained so we're going with that.

My slices package was a superset of go's own slices package so in some places I've just used
the official one (the methods were just wrappers anyway).

I've also moved the remaining methods into the utils package.
2023-07-30 18:51:23 +10:00
87bf1dbc7f Only apply right-alignment on first column of keybindings menu
Previously we applied a right-align on the first column of _all_ menus, even though we really
only intended for it to be on the first column of the keybindings menu (that you get from pressing
'?')
2023-07-20 21:23:46 +10:00
373f24c80f Fix crash on empty menu
When a menu is empty (e.g. due to filtering) we shouldn't crash on focus or selection
2023-07-20 21:05:52 +10:00
a9e2c8129f Introduce filtered list view model
We're going to start supporting filtering of list views
2023-07-03 12:54:13 +10:00
ec3a28df43 Right-align key labels in menu
I find this makes it look a little nicer
2023-05-21 12:09:43 +10:00
e1fc90615d Apply strikethrough style to reserved keybindings in menus
If a given menu item has an associated keybinding of 'enter', hitting enter won't actually execute
that item unless your cursor is on it. This creates confusion, and so we're going to use a strikethrough
style to communicate that the keybinding is reserved for something else.
2023-05-21 11:31:29 +10:00
43251e7275 split context common from helper common 2023-04-30 13:19:53 +10:00
e2db6a1732 remove context callback opts 2023-04-30 13:19:53 +10:00
509e3efa70 lots more refactoring 2023-04-30 13:19:53 +10:00
8edad826ca Begin refactoring gui
This begins a big refactor of moving more code out of the Gui struct into contexts, controllers, and helpers. We also move some code into structs in the
gui package purely for the sake of better encapsulation
2023-04-30 13:19:52 +10:00
7410acd1aa move merge conflicts code into controller 2022-08-07 11:16:03 +10:00
524bf83a4a refactor to only have one context per view 2022-08-06 13:49:11 +10:00
fab2e14b55 fix issue caused by opening a menu over a prompt 2022-08-01 21:38:57 +10:00
ab5a8091f5 add better support for OpensMenu option when creating a menu 2022-07-30 20:27:51 +10:00
6f8063217d rename displayString to label for menu items 2022-05-08 14:26:18 +10:00
f257740ea7 add tooltip view for showing menu item descriptions 2022-05-08 13:24:36 +10:00
897c4402a4 better colour 2022-03-27 18:16:16 +11:00
e94312b664 use colour 2022-03-27 18:16:16 +11:00
9c226eed37 allow menu to store keybindings for quick menu navigation 2022-03-27 18:16:16 +11:00
1b75ed3740 many more generics 2022-03-24 20:14:41 +11:00
d93fef4c61 use generics to DRY up context code 2022-03-19 12:12:57 +11:00
722410aded refactor controllers 2022-03-17 19:13:40 +11:00
d82f175e79 refactor contexts 2022-03-17 19:13:40 +11:00