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

73 Commits

Author SHA1 Message Date
82a3d33ce3 Remove calls to Error()
Now that we have an error handler set, we can simply let them bubble up all the
way to gocui.
2024-04-18 10:10:30 +02:00
f933a2f7ec Replace min/max helpers with built-in min/max
We upgraded our minimum Go version to 1.21 in commit
57ac9c2189. We can now replace our
`utils.Min` and `utils.Max` functions with the built-in `min` and `max`.

Reference: https://go.dev/ref/spec#Min_and_max
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2024-04-07 23:24:10 +08:00
b9a75ee0ed Make links clickable in confirmation panels
This is not opt-in, we do it always. I can't imagine a situation where we
wouldn't want it.
2024-03-29 10:55:33 +01:00
3b29705a78 Add config to truncate commit hashes when copying them to the clipboard
I often copy hashes in the commits panel in order to paste them into Github
comments (or other places), and I can't stand it when they have the full length.

I picked a default of 12 for this; I find this to be a good middle ground
between being reliable in large repos (12 still works in the linux kernel repo
today, but it might not be enough in really huge repos) and not being too ugly
(many smaller repos can probably get away with less).

We deliberately don't change this for the "Copy to clipboard" menu, since this
gives users a way to copy the unabbreviated sha if they need this occasionally.
2024-03-22 09:58:54 +01:00
51fb82d6bf Enforce single-item selection in various actions
We want to show an error when the user tries to invoke an action that expects only
a single item to be selected.

We're using the GetDisabledReason field to enforce this (as well as DisabledReason
on menu items).

I've created a ListControllerTrait to store some shared convenience functions for this.
2024-01-19 10:50:49 +11:00
9cc1d65280 Add demo test variant
We're piggybacking on our existing integration test framework to record  demos that we can include in our docs
2023-07-31 22:33:04 +10:00
d772c9f1d4 Use sentence case everywhere
We have not been good at consistent casing so far. Now we use 'Sentence case' everywhere. EVERYWHERE.

Also Removing 'Lc' prefix from i18n field names: the 'Lc' stood for lowercase but now that everything
is in 'Sentence case' there's no need for the distinction.

I've got a couple lower case things I've kept: namely, things that show up in parentheses.
2023-05-25 23:52:19 +10:00
f8c9ce33c2 move more actions into controller 2023-04-30 13:19:53 +10:00
1b2fb34ffd start moving getDisplayStrings funcs into contexts 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
445a625b56 rename merging context to mergeConflicts 2022-08-06 18:05:00 +10:00
524bf83a4a refactor to only have one context per view 2022-08-06 13:49:11 +10:00
e68093fe99 add scrollbars 2022-04-16 17:29:17 +10:00
ecaff7fc6c add commit files controller 2022-03-17 19:13:40 +11:00
722410aded refactor controllers 2022-03-17 19:13:40 +11:00
cd31a762b9 rename OSCommand field to os 2022-03-17 19:13:40 +11:00
482bdc4f1e more refactoring 2022-03-17 19:13:40 +11:00
f0c81ea6dc remove redundant popup checks 2022-03-17 19:13:40 +11:00
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
a90b6efded start refactoring gui 2022-03-17 19:13:40 +11:00
c8cc18920f improve merge conflict flow 2022-01-26 14:50:47 +11:00
364c5db19c shorten name 2022-01-09 14:09:53 +11:00
c9a0cc6b30 refactor 2022-01-09 14:09:53 +11:00
f503ff1ecb start breaking up git struct 2022-01-09 14:09:53 +11:00
0d3e5e6a1d simplify fetch 2022-01-07 10:52:51 +11:00
91fe68576c refactor 2022-01-07 10:52:51 +11:00
05fa483f48 simplify how we log commands 2022-01-07 10:52:51 +11:00
01ea5813a8 align Gui struct with GitCommand 2022-01-04 09:07:15 +11:00
1996eddd91 more efficient context diff size changing 2021-12-06 22:37:28 +11:00
37be9dbea1 support scrolling left and right 2021-11-05 07:58:21 +11:00
adee0b8ccb add spans to i18n 2021-04-11 23:36:34 +10:00
84b0c3df4f ask question button 2021-04-11 22:07:29 +10:00
069c7c9d35 fix test 2021-04-11 17:07:49 +10:00
393ce05860 allow focusing on command log view 2021-04-11 17:07:49 +10:00
4f03d7733a allow showing, hiding, and scrolling the extras panel 2021-04-11 17:07:49 +10:00
f2007f4d95 support scrolling extras view 2021-04-11 17:07:49 +10:00
6fbe660f96 full coverage for logging commands 2021-04-11 17:07:49 +10:00
d627b3bfc8 more refactoring 2021-04-06 19:34:32 +10:00
b6cc1c9492 small refactor 2021-04-06 19:34:32 +10:00
4fe512ff3a test
type safe view access
2021-04-06 19:34:32 +10:00
d44ff447bd fix panic 2021-04-06 19:34:32 +10:00
798d3e2d54 get rid of these positively ghastly method signatures 2021-04-06 19:34:32 +10:00
e8f99c3326 better scroll support 2021-04-06 19:34:32 +10:00
3ea5e4d4b2 allow scrolling when staging lines or building patch 2021-04-06 19:34:32 +10:00
7d62f103e4 big refactor to give our enums actual types 2021-04-02 11:00:15 +11:00
bb4bf23c5c gui: ReplaceAll -> Replace 2020-12-24 10:21:54 +01:00
3e13936e08 notify user upon copying something to clipboard 2020-11-21 17:31:08 +11:00
682db77401 fix lint errors 2020-11-18 08:36:19 +11:00
795e4da8b8 do not put mutexes on state else we might unlock an unlocked mutex 2020-10-10 00:23:01 +11:00