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

83 Commits

Author SHA1 Message Date
07a8ae8c3e add handler for searching in menu 2020-04-21 19:28:31 +10:00
e47ad846c4 big golangci-lint cleanup 2020-03-09 12:23:13 +11:00
52b5a6410c show item counts in frames 2020-02-25 07:19:46 +11:00
5b9996b16f remove old createMenu function 2020-02-15 08:47:36 +11:00
665fdded14 continue refactor of menu panel 2020-02-15 08:47:36 +11:00
814a0ea36f begin refactor of menu panel 2020-02-15 08:47:36 +11:00
3e875cc593 fix display of menu option keybindings 2020-01-07 13:26:29 -08:00
3b0cef2ec8 better handling of click events in list views 2019-11-21 22:07:14 +11:00
8aa1062e06 extract out some logic for list views 2019-11-21 22:07:14 +11:00
7e0a8f235e add contexts to views 2019-11-21 22:07:14 +11:00
e85310c0a9 add mouse support 2019-11-10 22:32:13 +11:00
02fef3136f Added light theme option to the settings 2019-10-20 12:32:57 +11:00
abddea060e revert menu panel error panel usage 2019-06-08 20:29:25 +10:00
0f0fda1660 allow stashing staged changes
reinstate old stash functionality with the 's' keybinding
2019-06-06 20:50:19 +10:00
bd46e9c5b0 delete menu keybinding before setting new one 2019-03-23 13:26:17 +11:00
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
ac5088eee6 allow both enter and space to execute menu item 2019-03-03 23:18:28 +11:00
ad93b4c863 consider whether the view has focus when rendering the contents of a view 2019-02-16 15:17:44 +11:00
198cbee498 introduce panel contexts and more work on rebasing 2019-02-16 12:07:27 +11:00
3d343e9b57 Merge branch 'master' into feature/rebasing 2019-02-11 21:02:53 +11:00
695b092c41 Directly send wrap argument rather than the view 2019-01-17 10:29:52 +11:00
9489a94473 Make merge panel its own panel 2018-12-11 22:02:12 +11:00
ff856b7630 fetching branches without checking out 2018-12-08 11:51:47 +11:00
ca3afa2a39 standardising how list panels deal with cursor movement 2018-12-08 11:51:47 +11:00
b384fcf6af generalise popup menu panel 2018-09-18 21:07:25 +10:00
a66ac8092e minor refactor 2018-09-17 21:27:53 +10:00
c00c834b35 standardise rendering of lists in panels 2018-09-17 21:02:30 +10:00
31c33dfdcb remove redundant comments 2018-09-12 18:47:37 +10:00
52b132fe01 better handling of cursor and origin positionings 2018-09-10 20:17:39 +10:00
9cef98f779 ladies and gentlemen...
this is fmt number x+1
2018-09-07 14:23:08 +02:00
ba6dedfb22 rewrite some of menu panel logic
panel keybindings are now on top and
global keybindings are below separated with empty newline
2018-09-07 14:19:16 +02:00
906f8e252e include global keybindings in menu 2018-09-05 13:16:40 +02:00
557009e660 help -> menu 2018-09-05 11:12:11 +02:00