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

31 Commits

Author SHA1 Message Date
10f29bc6b4 Fix race with PTYs in integration tests
In 8b8343b8a9 we made a change to run newPtyTask from AfterLayout; this is
needed so that the PTY gets the new, updated view size. However, this created a
race condition for integration tests that select a line in a list view and then
expect the main view to have certain content; sometimes that content gets
rendered too late.

I'm surprised that this didn't cause more tests to fail; right now I only know
of one test that occasionally fails because of this, which is stash/rename.go.

Fix this by moving the AfterLayout to inside newPtyTask, and do it only when we
are actually using a PTY (we don't when no pager is configured, which is the
case for integration tests).

The diff is best viewed with "ignore whitespace" turned on.
2025-03-28 11:16:04 +01:00
5446683881 Remove return value of RenderToMainViews and some related functions 2024-09-06 08:45:48 +02:00
5659f1f3e9 Bump gocui
And adapt client code.
2024-09-06 08:45:48 +02:00
8b8343b8a9 Run PTY tasks after layout so that they get the correct view size
This is important when using a pager that draws a horizontal line across the
entire width of the view; when changing from a file or directory that has only
unstaged (or only staged) changes to one that has both, the main view is split
in half, but the PTY task would be run on the view in its old state, so the
horizonal line would be too long and wrap around.
2024-06-23 12:36:40 +02:00
c66667c8c1 Fix main view refresh after adding the first file to a custom patch
This broke with 240948b.
2024-01-28 09:49:56 +01:00
240948b882 Return only visible views from TopViewInWindow
Without this it's not reliably possible to ask whether a given view is visible
by asking

  windowHelper.TopViewInWindow(context.GetWindowName()) == context.GetView()

because there could be transient, invisible contexts after it in the Z order.

I guess it's a bit of a coincidence that this has never been a problem so far.
2023-12-10 15:57:51 +01:00
64b2685c2d Visualize the "ignore whitespace" state in the subtitle of the diff view 2023-05-20 12:58:32 +10:00
68a9d7fd77 appease linter 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
e76fa5a6cb fix glitchy render of stale data when flicking through files and directories 2022-10-02 20:41:24 -07:00
d73a236d7c allow rendering to main panels from anywhere 2022-08-07 12:05:51 +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
145c69d9ae working again 2022-03-17 19:13:40 +11:00
cb0d3a480a use type switch instead of type key 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
d672b7342f stop resetting scroll all the time 2021-10-17 19:45:57 +11:00
e000620cdf fix windows compilation issue 2021-04-06 19:34:32 +10:00
fbb33b7abc remove code that I'm pretty sure isn't needed 2021-04-06 19:34:32 +10:00
39ae122304 more refactoring 2021-04-06 19:34:32 +10:00
c34c6926d5 fix some things up 2021-04-06 19:34:32 +10:00
4fe512ff3a test
type safe view access
2021-04-06 19:34:32 +10:00
0898a7bb57 refactor 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
682db77401 fix lint errors 2020-11-18 08:36:19 +11:00
da3e00823f allow submodule init and show submodule diff with a prefix 2020-10-02 08:09:42 +10:00
55e6366529 run task for appropriate view 2020-08-23 14:29:18 +10:00
0dd2c869a8 minor refactor 2020-08-23 14:29:18 +10:00
f5b22d94d9 WIP 2020-08-23 14:29:18 +10:00
3c87ff4eff WIP: standardising how we render to main 2020-08-23 14:29:18 +10:00