1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-03 00:57:52 +02:00

194 Commits

Author SHA1 Message Date
65b731f484 Bump gocui 2024-09-28 12:04:51 +02: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
5380fe2483 Fix rendering regression introduced in #3839 2024-08-24 11:46:53 +02:00
0aa351443f Bump gocui 2024-08-24 10:47:25 +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
da8e4e44b7 Bump gocui 2024-08-17 10:50:32 +02:00
62ca873ddd Bump gocui 2024-08-17 10:25:16 +02:00
32cfe7a5c3 Bump gocui 2024-06-28 08:14:05 +02:00
db0a1586d9 Highlight inactive selection in bold
An inactive selection is one where the view is part of the context stack, but
not the active view. For example, the files view when you enter the staging
panel, or any view when you open a panel.
2024-06-23 14:43:13 +02:00
9eb9b369ff Bump gocui 2024-06-23 11:54:01 +02:00
6a6316cfb6 Use model searching in commits (and sub-commits) view 2024-06-23 11:43:12 +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
8487bc397d Remove our yaml fork
Switch back to the official go-yaml package.
2024-03-29 17:55:06 +01:00
99ad6005e8 Bump gocui 2024-03-09 10:00:07 +01: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
24a4302c52 Add range selection ability on list contexts
This adds range select ability in two ways:
1) Sticky: like what we already have with the staging view i.e. press v then use arrow keys
2) Non-sticky: where you just use shift+up/down to expand the range

The state machine works like this:
(no range, press 'v') -> sticky range
(no range, press arrow) -> no range
(no range, press shift+arrow) -> nonsticky range
(sticky range, press 'v') -> no range
(sticky range, press arrow) -> sticky range
(sticky range, press shift+arrow) -> nonsticky range
(nonsticky range, press 'v') -> no range
(nonsticky range, press arrow) -> no range
(nonsticky range, press shift+arrow) -> nonsticky range
2024-01-19 10:47:21 +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
c74448f00d Don't select current search result when showing search status
Previously there was no way to render a view's search status without also moving the cursor
to the current search match. This caused issues where we wanted to display the status
after leaving the view and coming back, or when beginning a new search from within the
view.

This commit separates the two use cases so we only move the cursor when we're actually
selecting the next search match
2023-09-25 16:37:59 +10:00
917eb88617 Bump gocui 2023-09-09 09:44:50 +02:00
ebdfd8046a Bump gocui 2023-08-15 11:40:40 +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
e33fe37a99 Standardise on using lo for slice functions
We've been sometimes using lo and sometimes using my slices package, and we need to pick one
for consistency. Lo is more extensive and better maintained so we're going with that.

My slices package was a superset of go's own slices package so in some places I've just used
the official one (the methods were just wrappers anyway).

I've also moved the remaining methods into the utils package.
2023-07-30 18:51:23 +10:00
75674d819c bring back yaml library fork 2023-07-26 12:50:39 +03:00
8637587b82 Better word wrap
Word wrapping has been pretty bad so far so let's fix that.
2023-07-23 11:43:10 +10:00
866e0a618b Add integration test for accordion mode 2023-07-19 22:17:29 +10:00
be02786dad Fix accordion issue
This fixes the issue in accordion mode where the current line wasn't in the viewport upon focus.

It doesn't perfectly fix it: the current line always appears at the top of the view. But it's good enough
to cut a new release. The proper fix is to only focus the line after the view has had its height adjusted.
2023-07-19 20:39:10 +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
4df353d006 Bump gocui 2023-07-02 15:47:04 +10:00
4ff02bd3b7 Add integration test for commit highlighting on focus
A better refactor would be to allow matchers to assert against either a string or a slice of cells, so that I could have
the same ergonomics that I have elsewhere, but this is a start.
2023-06-01 22:20:30 +10:00
cc0edd42bb Merge pull request #2508 from Ryooooooga/remove-jesseduffield-yaml 2023-05-30 17:39:25 +10:00
8121a0cc74 remove old integration test recording code 2023-03-24 18:42:11 +11:00
c28e25524a bump gocui to fix race condition 2023-03-19 16:30:39 +11:00
b542579db3 Better escape code parsing (thanks to Ryooooooga) (#2514) 2023-03-19 15:41:47 +11:00
33f332e28d build: remove github.com/jesseduffield/yaml package 2023-03-17 23:19:11 +09:00
db011d8e34 Improve staging panel integration tests 2023-02-25 11:35:41 +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
cf048e4807 bump gocui 2022-11-25 21:48:44 +09:00
4fa8586191 Update go-git to handle negative refspecs 2022-11-12 07:24:14 +01:00