1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-05 00:59:19 +02:00
Commit Graph

99 Commits

Author SHA1 Message Date
9e64f7dd66 Bump gocui and adapt lazygit code
Adaptions are for this gocui commit:

Cleanup: remove Is* error functions

- Use errors.Is instead of quality comparisons. This is better because it
  matches wrapped errors as well, which we will need later in this branch.
- Inline the errors.Is calls at the call sites. This is idiomatic go, we don't
  need helper functions for this.

See https://go.dev/blog/go1.13-errors for more about this.
2025-06-05 13:20:38 +02:00
5dbd91038a Bump gocui
See https://github.com/jesseduffield/gocui/pull/80.

This fixes selecting hunks in the staging view that are longer than the screen.
2025-05-29 14:33:17 +02:00
c80b0e1910 Bump gocui 2025-05-22 08:48:14 +02:00
46ebfbbe87 Bump gocui 2025-02-10 13:40:22 +01:00
49ca7f6a84 Bump gocui 2025-01-07 17:39:01 +01:00
2417b70acd Bump gocui 2024-12-23 12:24:09 +01:00
f6f2a52dee Bump gocui and adapt lazygit code
Original commit message of the gocui change:

This fixes View.Size, Width and Height to be the correct (outer) size of a view
including its frame, and InnerSize/InnerWidth/InnerHeight to be the usable
client area exluding the frame. Previously, Size was actually the InnerSize (and
a lot of client code used it as such, so these need to be changed to InnerSize).
InnerSize, on the other hand, was *one* less than Size (not two, as you would
have expected), and in many cases this was made up for at call sites by adding 1
(e.g. in calcRealScrollbarStartEnd, parseInput, and many other places in the
lazygit code).

There are still some weird things left that I didn't address here:
- a view's lower-right coordinates (x1/y1) are one less than you would expect.
  For example, a view with a 2x2 client area like this:
    ╭──╮
    │ab│
    │cd│
    ╰──╯
  in the top-left corner of the screen (x0 and y0 both zero) has x1/xy at 3, not
  4 as would be more natural.
- a view without a frame has its coordinates extended by 1 on all sides; to
  illustrate, the same 2x2 view as before but without a frame, sitting in the
  top-left corder of the screen, has coordinates x0=-1, y0=-1, x1=2, y1=2. This
  is highly confusing and unexpected.

I left these as they are because they would be even more of a breaking change,
and also because they don't have quite as much of an impact on general app code.
2024-12-01 10:40:08 +01:00
5659f1f3e9 Bump gocui
And adapt client code.
2024-09-06 08:45:48 +02:00
8d37f48744 Bump gocui 2024-08-24 17:45:51 +02:00
250eb14de1 Bump gocui 2024-08-24 10:35:59 +02:00
59450c7d12 Bump gocui 2024-08-24 10:21:25 +02:00
07dd8a2b07 Bump gocui 2024-08-18 10:24:52 +02:00
32cfe7a5c3 Bump gocui 2024-06-28 08:14:05 +02:00
9f8ae76189 Bump gocui
In Gui.onWorker we only make the minimum possible change to get things to
compile after the API-breaking change of the gocui update; we'll make this
cleaner later in this branch.
2024-04-18 10:10:30 +02:00
f9e8428061 Use slimmer scrollbars
The previous scrollbars were too chunky and encroached too much on a view's content.

The new ones are slim and right-aligned so they encroach into dead space between views
which is much better
2024-01-30 08:44:03 +11:00
cb5d0bca1c Bump gocui
... and switch back from stefanhaller's tcell fork to the official tcell. This
basically reverts 7ccb871a45.
2024-01-10 09:39:25 +01:00
a46f26e148 Bump gocui 2023-12-09 15:23:40 +01:00
917eb88617 Bump gocui 2023-09-09 09:44:50 +02:00
ed1547e0cb Add a Click() primitive to the integration test library 2023-08-07 15:10:28 +01:00
7ccb871a45 Bump gocui
... and import stefanhaller's tcell fork for real rather than just replacing it

This solves the problem that people trying to
"go install github.com/jesseduffield/lazygit@latest" would get the error

go: github.com/jesseduffield/lazygit@latest (in github.com/jesseduffield/lazygit@v0.40.0):
  The go.mod file for the module providing named packages contains one or
  more replace directives. It must not contain directives that would cause
  it to be interpreted differently than if it were the main module.
2023-08-06 12:03:23 +02:00
c5acbb6c7c Bump gocui 2023-08-02 11:35:36 +02:00
866e0a618b Add integration test for accordion mode 2023-07-19 22:17:29 +10:00
6b9390409e Use an interface for tasks instead of a concrete struct
By using an interface for tasks we can use a fake implementation in tests with extra methods
2023-07-10 17:12:21 +10:00
14ecc15e71 Use first class task objects instead of global counter
The global counter approach is easy to understand but it's brittle and depends on implicit behaviour that is not very discoverable.

With a global counter, if any goroutine accidentally decrements the counter twice, we'll think lazygit is idle when it's actually busy.
Likewise if a goroutine accidentally increments the counter twice we'll think lazygit is busy when it's actually idle.
With the new approach we have a map of tasks where each task can either be busy or not. We create a new task and add it to the map
when we spawn a worker goroutine (among other things) and we remove it once the task is done.

The task can also be paused and continued for situations where we switch back and forth between running a program and asking for user
input.

In order for this to work with `git push` (and other commands that require credentials) we need to obtain the task from gocui when
we create the worker goroutine, and then pass it along to the commands package to pause/continue the task as required. This is
MUCH more discoverable than the old approach which just decremented and incremented the global counter from within the commands package,
but it's at the cost of expanding some function signatures (arguably a good thing).

Likewise, whenever you want to call WithWaitingStatus or WithLoaderPanel the callback will now have access to the task for pausing/
continuing. We only need to actually make use of this functionality in a couple of places so it's a high price to pay, but I don't
know if I want to introduce a WithWaitingStatusTask and WithLoaderPanelTask function (open to suggestions).
2023-07-09 21:30:19 +10:00
631cf1e873 Bump gocui
This includes new gocui logic for tracking busy/idle program state
2023-07-08 22:26:28 +10:00
8121a0cc74 remove old integration test recording code 2023-03-24 18:42:11 +11:00
b542579db3 Better escape code parsing (thanks to Ryooooooga) (#2514) 2023-03-19 15:41:47 +11:00
a51f64814c show snapshot of lazygit when test fails for easier investigation 2023-02-19 15:48:09 +11:00
01bf7f21e6 bump gocui 2023-02-18 10:28:09 +11:00
c517d1e0a2 update view cursor when selecting new line in patch explorer view 2023-02-18 10:19:34 +11:00
657b1e897f build: bump gocui 2023-01-06 10:59:09 +09:00
abbd598992 bump gocui 2022-12-20 22:06:44 +11:00
4aa9147dfa build: $ ./scripts/bump_gocui.sh 2022-10-18 22:20:04 +09:00
e76fa5a6cb fix glitchy render of stale data when flicking through files and directories 2022-10-02 20:41:24 -07:00
7af7af27c6 various changes to improve integration tests 2022-09-16 08:42:39 -07:00
77881a9c7d add new integration test pattern 2022-08-11 21:24:15 +10:00
524bf83a4a refactor to only have one context per view 2022-08-06 13:49:11 +10:00
83dfc3b28b Update gocui 2022-07-29 06:59:52 +02:00
3477cbc81f better weight distribution in window arrangement 2022-04-17 12:48:04 +10:00
e68093fe99 add scrollbars 2022-04-16 17:29:17 +10:00
6a153acc8f clearer highlighting of current line 2022-04-16 15:19:32 +10:00
59d4df2a44 fix click handling 2022-03-17 19:13:40 +11:00
145c69d9ae working again 2022-03-17 19:13:40 +11:00
482bdc4f1e more refactoring 2022-03-17 19:13:40 +11:00
2a1e3faa0c resetting controllers on new repo 2022-03-17 19:13:40 +11:00
802cfb1a04 render commit graph 2021-11-05 07:58:21 +11:00
2fc1498517 some refactoring in anticipation of the graph feature 2021-11-01 10:03:49 +11:00
f704707d29 stream output from certain git commands in command log panel 2021-10-30 18:26:06 +11:00
71fdc5c038 better title rendering 2021-10-18 09:21:33 +11:00
ab0117c416 fix some encodings 2021-09-27 19:58:24 +10:00