1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-19 17:02:18 +03:00

5 Commits

Author SHA1 Message Date
Jesse Duffield
28d10c26a4 Standardise on 'screen mode' name
We had some conflicting names so we're standardising on screen mode
2025-01-11 14:25:48 +11:00
Stefan Haller
b91beb68e1 Remove return value of HandleRender 2024-09-06 08:45:48 +02:00
Stefan Haller
a67eda39a5 Rerender fewer views when their width changes
In d5b4f7bb3e and 58a83b0862 we introduced a combined mechanism for rerendering
views when either their width changes (needed for the branches view which
truncates long branch names), or the screen mode (needed for those views that
display more information in half or full screen mode, e.g. the commits view).

This was a bad idea, because it unnecessarily rerenders too many views when just
their width changes, which causes a noticable lag. This is a problem, for
example, when selecting a file in the files panel that has only unstaged
changes, and then going to one that has both staged and unstaged changes; this
splits the main view, causing the side panels to become a bit narrower, and
rerendering all those views took almost 500ms on my machine. Another similar
example is entering or leaving staging mode.

Fix this by being more specific about which views need rerendering under what
conditions; this improves the time it takes to rerender in the above scenarios
from 450-500s down to about 20ms.

This reintroduces the code that was removed in 58a83b0862, but in a slightly
different way.
2024-06-23 13:10:48 +02:00
Stefan Haller
58a83b0862 Remove special code to rerender views on screen mode change
The previous commit handles this case too.
2023-10-16 09:03:07 +02:00
Jesse Duffield
f8c9ce33c2 move more actions into controller 2023-04-30 13:19:53 +10:00