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

52 Commits

Author SHA1 Message Date
Jesse Duffield
6f8063217d rename displayString to label for menu items 2022-05-08 14:26:18 +10:00
Jesse Duffield
1b75ed3740 many more generics 2022-03-24 20:14:41 +11:00
Jesse Duffield
cd31a762b9 rename OSCommand field to os 2022-03-17 19:13:40 +11:00
Jesse Duffield
2a1e3faa0c resetting controllers on new repo 2022-03-17 19:13:40 +11:00
Jesse Duffield
138be04e65 refactor contexts code 2022-03-17 19:13:40 +11:00
Jesse Duffield
1a74ed3214 avoid deadlock 2022-03-17 19:13:40 +11:00
Jesse Duffield
1dd7307fde start moving commit panel handlers into controller
more

and more

move rebase commit refreshing into existing abstraction

and more

and more

WIP

and more

handling clicks

properly fix merge conflicts

update cheatsheet

lots more preparation to start moving things into controllers

WIP

better typing

expand on remotes controller

moving more code into controllers
2022-03-17 19:13:40 +11:00
Jesse Duffield
a90b6efded start refactoring gui 2022-03-17 19:13:40 +11:00
David Roman
b8fc829f86 Record current directory on switch 2022-03-17 19:01:28 +11:00
Jesse Duffield
cdcfeb396f stop refreshing the screen so much 2022-01-15 14:15:41 +11:00
Jesse Duffield
364c5db19c shorten name 2022-01-09 14:09:53 +11:00
Jesse Duffield
3621854dc7 fix tests 2022-01-09 14:09:53 +11:00
Jesse Duffield
f503ff1ecb start breaking up git struct 2022-01-09 14:09:53 +11:00
Jesse Duffield
43a4fa970d WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield
192a548c99 refactoring the config struct 2022-01-04 09:07:15 +11:00
Jesse Duffield
01ea5813a8 align Gui struct with GitCommand 2022-01-04 09:07:15 +11:00
Jesse Duffield
18ab086126 introduce Common struct for passing around common stuff 2022-01-04 09:07:15 +11:00
Jesse Duffield
b4c078d565 WIP 2022-01-04 09:07:15 +11:00
Jesse Duffield
b6a5e9d615 use cached git config 2021-10-23 10:26:47 +11:00
Jesse Duffield
d02e52989e small changes 2021-10-16 12:22:34 +11:00
mjarkk
913a2fd065 Allow having multiple config files 2021-10-16 12:22:34 +11:00
mjarkk
79848087bc Switch to github.com/gookit/color for terminal colors 2021-07-30 15:14:46 +02:00
Jesse Duffield
7178bab6b4 only re-use repo state when jumping in and out of submodules 2021-04-06 19:34:32 +10:00
Jesse Duffield
4fe512ff3a test
type safe view access
2021-04-06 19:34:32 +10:00
Jesse Duffield
633b6f596d WIP 2021-04-06 19:34:32 +10:00
Jesse Duffield
f1d7f59e49 switching repos without restarting the gui 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
8af3fe3b4a faster startup 2021-04-01 09:13:29 +11:00
Yuki Osaki
4928d1d490 Visualize the commits for all branches 2020-11-28 19:19:47 +11:00
Jesse Duffield
37bb89dac3 type i18n 2020-10-10 00:23:01 +11:00
Jesse Duffield
914fb36173 allow entering and returning from submodule 2020-09-29 18:21:59 +10:00
Jesse Duffield
75598ea2a1 move git dir env stuff into a centralised package 2020-09-29 17:42:07 +10:00
Jesse Duffield
e873816160 do not include bare repos in recent repos list 2020-09-29 17:42:07 +10:00
Jesse Duffield
23626755d7 unset GIT_WORK_TREE and GIT_DIR when switching repos 2020-09-29 17:42:07 +10:00
Jesse Duffield
fbd61fcd17 refactor how we handle different modes 2020-08-23 14:29:18 +10:00
Jesse Duffield
9b7a6934b3 more removing of g 2020-08-15 18:01:43 +10:00
Jesse Duffield
d90d9d7330 reset state on each Run() call 2020-03-29 11:37:29 +11:00
Jesse Duffield
5b9996b16f remove old createMenu function 2020-02-15 08:47:36 +11:00
Jesse Duffield
d929b84786 refactor recent repos menu panel 2020-02-15 08:47:36 +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
76a27f417f rename any commit 2019-02-18 21:29:43 +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
3d343e9b57 Merge branch 'master' into feature/rebasing 2019-02-11 21:02:53 +11:00
Jesse Duffield
9489a94473 Make merge panel its own panel 2018-12-11 22:02:12 +11:00
mjarkk
e20d8366e1 Made gobot happy 2018-12-10 14:21:00 +01:00
mjarkk
76e9582739 Not always git fetch 2018-12-10 13:45:03 +01:00
mjarkk
3c17bf761a Better name for this function 2018-12-10 07:46:26 +01:00
mjarkk
696d6dc20c Fixed loop before error check 2018-12-10 07:43:32 +01:00
mjarkk
ced81e11f0 Only show private repo popup when opening repo for first time 2018-12-06 22:05:16 +01:00
BlakeMScurr
181f91d2ef Add full stops to new comments. 2018-11-30 13:47:14 +13:00