jesseduffield.lazygit/pkg
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
..
app Add -profile command line flag 2024-06-03 19:07:24 +02:00
cheatsheet Render keybinding cheatsheet as markdown table 2024-01-28 08:12:01 +11:00
commands Fix custom patch operations on added files 2024-06-23 12:40:31 +02:00
common Add AppState to common.Common 2023-09-04 17:48:39 +02:00
config Add user config gui.commitAuthorFormat 2024-06-15 10:39:50 +04:00
constants Make the links in the status panel point to the current version rather than master 2024-03-22 08:13:59 +01:00
env Support bare worktrees where worktree does not have its own .git file 2023-08-07 22:40:53 +10:00
fakes cleanup integration test code 2023-02-26 12:54:13 +11:00
gui Rerender fewer views when their width changes 2024-06-23 13:10:48 +02:00
i18n Always show the "Discard unchanged changes" menu item 2024-06-23 12:43:34 +02:00
integration Show radio buttons in the sort order menu for branches 2024-06-23 12:53:15 +02:00
jsonschema Fix boolean config keys not appearing in the generated Config.md 2024-05-31 20:07:58 +02:00
logs Remove secureexec package 2023-07-30 19:59:51 +10:00
snake integrate snake game into lazygit 2022-12-30 12:18:59 +11:00
tasks Use ScanLinesAndTruncateWhenLongerThanBuffer instead of bufio.ScanLines 2024-05-15 13:27:01 +02:00
theme pkg: fix some comment 2024-04-07 16:09:26 +08:00
updates Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
utils Use actual ellipsis character instead of ... to truncate strings 2024-06-23 12:25:28 +02:00