1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
Commit Graph

56 Commits

Author SHA1 Message Date
Jesse Duffield
652c97d239 honour options menu press 2021-09-27 19:41:38 +10:00
Cristian Betivu
39c8577074 Use static context 2021-06-16 15:00:17 +10:00
Cristian Betivu
0c135515a5 Use parent view for tab navigation 2021-06-16 15:00:17 +10:00
Jesse Duffield
cf78b86cb5 more support for command log and more code reuse for contexts 2021-04-11 17:07:49 +10:00
Jesse Duffield
4fe512ff3a test
type safe view access
2021-04-06 19:34:32 +10:00
Jesse Duffield
0898a7bb57 refactor 2021-04-06 19:34:32 +10:00
Jesse Duffield
bc9a99387f refactor of contexts and filtering 2021-04-06 19:34:32 +10:00
Jesse Duffield
798d3e2d54 get rid of these positively ghastly method signatures 2021-04-06 19:34:32 +10:00
Jesse Duffield
da3b0bf7c8 Start on supporting auto-suggestions when checking out a branch
switch to other fuzzy package with no dependencies
2020-11-28 20:48:17 +11:00
Jesse Duffield
37bb89dac3 type i18n 2020-10-10 00:23:01 +11:00
Jesse Duffield
4912205adb remove viper
WIP
2020-10-10 00:23:01 +11:00
Jesse Duffield
8dae54ab8c fix panic 2020-09-26 11:56:22 +10:00
Jesse Duffield
fda9f4ea7a centralise logic for rendering options map 2020-08-23 14:29:18 +10:00
Jesse Duffield
146722beb8 rename to SelectedLineIdx 2020-08-23 14:29:18 +10:00
Jesse Duffield
99707a527d WIP 2020-08-23 14:29:18 +10:00
Jesse Duffield
ac0eedda91 lots more stuff 2020-08-23 14:29:18 +10:00
Jesse Duffield
e87635295a dont check for error when sending view to bottom 2020-08-23 14:29:18 +10:00
Jesse Duffield
7f89113245 WIP 2020-08-23 14:29:18 +10:00
Jesse Duffield
44d8b3e8f3 allow overriding default confirm/escape keybindings 2020-08-17 18:22:57 +10:00
Jesse Duffield
9b7a6934b3 more removing of g 2020-08-15 18:01:43 +10:00
Jesse Duffield
cc872b0444 menu view 2020-08-15 18:01:43 +10:00
Jesse Duffield
d9fa02c53b clean up interface for popup panels 2020-08-15 18:01:43 +10:00
Jesse Duffield
845c80721f Decouple escaping from quitting
When a user is not entering text into a prompt, the 'q' key should immediately
quit the application. On the other hand, the 'esc' key should cancel/close/go-back
to the previous context.

If we're at the surface level (nothing to cancel/close) and the user hits the
escape key, the default behaviour is to close the app, however we now have a
`quitOnTopLevelReturn` config key to override this.

I actually think from the beginning we should have made this config option
default to false rather than true which is the default this PR gives it,
but I don't want to anger too many people familiar with the existing behaviour.
2020-07-18 20:00:48 +10:00
Jesse Duffield
07a8ae8c3e add handler for searching in menu 2020-04-21 19:28:31 +10:00
Jesse Duffield
e47ad846c4 big golangci-lint cleanup 2020-03-09 12:23:13 +11:00
Jesse Duffield
52b5a6410c show item counts in frames 2020-02-25 07:19:46 +11:00
Jesse Duffield
5b9996b16f remove old createMenu function 2020-02-15 08:47:36 +11:00
Jesse Duffield
665fdded14 continue refactor of menu panel 2020-02-15 08:47:36 +11:00
Jesse Duffield
814a0ea36f begin refactor of menu panel 2020-02-15 08:47:36 +11:00
David Chen
3e875cc593 fix display of menu option keybindings 2020-01-07 13:26:29 -08:00
Jesse Duffield
3b0cef2ec8 better handling of click events in list views 2019-11-21 22:07:14 +11:00
Jesse Duffield
8aa1062e06 extract out some logic for list views 2019-11-21 22:07:14 +11:00
Jesse Duffield
7e0a8f235e add contexts to views 2019-11-21 22:07:14 +11:00
Jesse Duffield
e85310c0a9 add mouse support 2019-11-10 22:32:13 +11:00
mjarkk
02fef3136f Added light theme option to the settings 2019-10-20 12:32:57 +11:00
Jesse Duffield
abddea060e revert menu panel error panel usage 2019-06-08 20:29:25 +10:00
Jesse Duffield
0f0fda1660 allow stashing staged changes
reinstate old stash functionality with the 's' keybinding
2019-06-06 20:50:19 +10:00
Jesse Duffield
bd46e9c5b0 delete menu keybinding before setting new one 2019-03-23 13:26:17 +11:00
Jesse Duffield
d84dfc23e7 Rely on model rather than view to focus a point
Currently when we want to focus a point on a view (i.e. highlight a
line and ensure it's within the bounds of a view's box, we use the
LinesHeight method on the view to work out how many lines in total
there are.

This is bad because for example if we come back from editing a file,
the view will have no contents so LinesHeight == 0, but we might
be trying to select line 10 because there are actual ten things we
expect to be rendered already. This causes a crash when e.g. 10 is
greater than the height of the view.

So we need to pass in to our FocusPoint method the actual number of
items we want to render, rather than having the method rely on the
LinesHeight, so that the method knows to scroll a bit before setting
the cursor's y position.

Unfortunately this makes for some awkward code with our current setup.
We don't have a good interface type on these state objects so we now
need to explicitly obtain the len() of whatever array we're rendering.

In the case of the menu panel this is even more awkward because the items
list is just an interface{} and it's not easy to get the list of that, so
now when we instantiate a menu we need to pass in the count of items
as well.

The better solution would be to define an interface with a getItems
and getLength method and have all these item arrays become structs
implementing the interface, but I am too lazy to do this right now :)
2019-03-23 11:54:25 +11:00
Jesse Duffield
ac5088eee6 allow both enter and space to execute menu item 2019-03-03 23:18:28 +11:00
Jesse Duffield
ad93b4c863 consider whether the view has focus when rendering the contents of a view 2019-02-16 15:17:44 +11:00
Jesse Duffield
198cbee498 introduce panel contexts and more work on rebasing 2019-02-16 12:07:27 +11:00
Jesse Duffield
3d343e9b57 Merge branch 'master' into feature/rebasing 2019-02-11 21:02:53 +11:00
Jesse Duffield
695b092c41 Directly send wrap argument rather than the view 2019-01-17 10:29:52 +11:00
Jesse Duffield
9489a94473 Make merge panel its own panel 2018-12-11 22:02:12 +11:00
Jesse Duffield
ff856b7630 fetching branches without checking out 2018-12-08 11:51:47 +11:00
Jesse Duffield
ca3afa2a39 standardising how list panels deal with cursor movement 2018-12-08 11:51:47 +11:00
Jesse Duffield
b384fcf6af generalise popup menu panel 2018-09-18 21:07:25 +10:00
Jesse Duffield
a66ac8092e minor refactor 2018-09-17 21:27:53 +10:00
Jesse Duffield
c00c834b35 standardise rendering of lists in panels 2018-09-17 21:02:30 +10:00