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

156 Commits

Author SHA1 Message Date
Jesse Duffield
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
Jesse Duffield
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
Jesse Duffield
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
Jesse Duffield
631cf1e873 Bump gocui
This includes new gocui logic for tracking busy/idle program state
2023-07-08 22:26:28 +10:00
Jesse Duffield
1a36cb9f3f
View filtering (#2680) 2023-07-03 12:57:11 +10:00
Jesse Duffield
4df353d006 Bump gocui 2023-07-02 15:47:04 +10:00
Gustavo Krieger
87fe30d50d Bump git-todo-parser 2023-07-02 02:07:32 -03:00
Jesse Duffield
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
Jesse Duffield
33789d67f0
Merge pull request #2490 from jesseduffield/dependabot/go_modules/golang.org/x/net-0.7.0 2023-05-30 17:56:18 +10:00
Jesse Duffield
cc0edd42bb
Merge pull request #2508 from Ryooooooga/remove-jesseduffield-yaml 2023-05-30 17:39:25 +10:00
Stefan Haller
d210107caa Bump github.com/fsmiamoto/git-todo-parser to latest version 2023-04-29 07:28:33 +02:00
Andre Mueller
07a22e69e7 bump clipboard package for WSL support 2023-04-24 13:33:27 +10:00
Stefan Haller
62c5c32fbb Bump github.com/fsmiamoto/git-todo-parser to latest main version 2023-04-15 08:36:03 +02:00
Jesse Duffield
8121a0cc74 remove old integration test recording code 2023-03-24 18:42:11 +11:00
Jesse Duffield
c28e25524a bump gocui to fix race condition 2023-03-19 16:30:39 +11:00
dependabot[bot]
e842548fc8
Bump golang.org/x/net from 0.0.0-20220722155237-a158d28d115b to 0.7.0
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20220722155237-a158d28d115b to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-19 04:42:38 +00:00
Jesse Duffield
b542579db3
Better escape code parsing (thanks to Ryooooooga) (#2514) 2023-03-19 15:41:47 +11:00
Ryooooooga
33f332e28d
build: remove github.com/jesseduffield/yaml package 2023-03-17 23:19:11 +09:00
Jesse Duffield
db011d8e34 Improve staging panel integration tests 2023-02-25 11:35:41 +11:00
Ryooooooga
90772e1eaa
build: bump tcell version 2023-02-21 21:53:55 +09:00
Jesse Duffield
a51f64814c show snapshot of lazygit when test fails for easier investigation 2023-02-19 15:48:09 +11:00
Jesse Duffield
01bf7f21e6 bump gocui 2023-02-18 10:28:09 +11:00
Ryooooooga
657b1e897f
build: bump gocui 2023-01-06 10:59:09 +09:00
Jesse Duffield
abbd598992 bump gocui 2022-12-20 22:06:44 +11:00
Ryooooooga
cf048e4807
bump gocui 2022-11-25 21:48:44 +09:00
Lukasz Piatkowski
4fa8586191 Update go-git to handle negative refspecs 2022-11-12 07:24:14 +01:00
Ryooooooga
4aa9147dfa
build: $ ./scripts/bump_gocui.sh 2022-10-18 22:20:04 +09:00
Gustavo Andrioli
39e84e13f4 Use lazycore utils: Clamp and GetLazyRootDirectory 2022-10-15 13:55:44 -03:00
Jesse Duffield
575afa1377 update vendor directory 2022-10-11 08:12:56 -07:00
Jesse Duffield
dba0edb998 use boxlayout from lazycore 2022-10-09 08:31:14 -07:00
Jesse Duffield
e3f21f0588 strip NUL bytes instead of replacing with space 2022-10-03 09:29:41 -07:00
Jesse Duffield
e76fa5a6cb fix glitchy render of stale data when flicking through files and directories 2022-10-02 20:41:24 -07:00
Jesse Duffield
5670c0a301 bump gocui 2022-10-02 18:43:25 -07:00
Ryooooooga
1c82924307
build: $ ./scripts/bump_gocui.sh 2022-09-23 20:01:44 +09:00
Jesse Duffield
7af7af27c6 various changes to improve integration tests 2022-09-16 08:42:39 -07:00
Jesse Duffield
8a1937787d fix gocui mismatch 2022-08-15 20:01:43 +10:00
Jesse Duffield
f3837000dd bump gocui 2022-08-13 20:12:04 +10:00
Jesse Duffield
755ae0ef84 add deadlock mutex package
write to deadlock stderr after closing gocui

more deadlock checking
2022-08-07 11:16:14 +10:00
Jesse Duffield
524bf83a4a refactor to only have one context per view 2022-08-06 13:49:11 +10:00
Luka Markušić
83dfc3b28b Update gocui 2022-07-29 06:59:52 +02:00
Jesse Duffield
c9d891a913 better process killing 2022-06-18 13:39:22 +10:00
Francisco Miamoto
0b08a0b298 build: add github.com/fsmiamoto/git-todo-parser 2022-06-12 20:01:32 -03:00
Jesse Duffield
3477cbc81f better weight distribution in window arrangement 2022-04-17 12:48:04 +10:00
Jesse Duffield
e68093fe99 add scrollbars 2022-04-16 17:29:17 +10:00
Jesse Duffield
00afa30ebf better appearance for reverse attribute 2022-04-16 15:19:32 +10:00
Jesse Duffield
6a153acc8f clearer highlighting of current line 2022-04-16 15:19:32 +10:00
Jesse Duffield
336f2772e8 bump gocui 2022-04-08 12:15:23 +10:00
Jesse Duffield
43d3f2bcb6 refactor todo file generation 2022-03-24 20:14:41 +11:00
Jesse Duffield
cb26c7a1f2 more things 2022-03-24 20:14:41 +11:00
Jesse Duffield
94a53484a1 would you believe that I'm adding even more generics 2022-03-24 20:14:41 +11:00