jesseduffield.lazygit/pkg/gui/controllers
Stefan Haller 670565c175 Have renderAppStatus trigger a full layout when the appStatus width changes
In 0d195077e4 we improved the performance of the status bar spinner by
avoiding a layout. This is fine from one spinner tick to the next, but it's a
problem when spinning starts or ends (or in the hypothetical case that the
status text changes in the middle of the operation, which we never do in
lazygit, but theoretically could). In this case a layout is needed so that the
rest of the status bar gets pushed over appropriately (or moves back to the left
when the spinner ends), and also so that the bottom line is shown or hidden
properly for users who set gui.showBottomLine to false.

To fix this, keep track of the status string width and force a layout whenever
it changes. This includes the beginning and end of an operation when it changes
from empty to non-empty or vice versa.

There is currently no observable misbehavior from this bug, but that's only
because we must have a HandleRender call somewhere that forces a full layout
when an operation starts or ends. We will remove the Render() call from
HandleRender at the end of this branch, at which point the misbehavior would be
visible if we didn't fix it here.
2026-05-09 13:58:33 +02:00
..
helpers Have renderAppStatus trigger a full layout when the appStatus width changes 2026-05-09 13:58:33 +02:00
attach.go Add OnQuit hook for controllers 2026-04-21 11:25:29 +02:00
base_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
basic_commits_controller.go Add Key type 2026-04-30 22:14:26 +02:00
bisect_controller.go Add Key type 2026-04-30 22:14:26 +02:00
branches_controller.go Add Key type 2026-04-30 22:14:26 +02:00
command_log_controller.go Remove return value of Focus-related functions 2024-09-06 08:45:48 +02:00
commit_description_controller.go Move modifiers into Key 2026-04-30 22:22:53 +02:00
commit_message_controller.go Move modifiers into Key 2026-04-30 22:22:53 +02:00
commits_files_controller.go Add Key type 2026-04-30 22:14:26 +02:00
common.go lots of changes 2023-04-30 13:19:53 +10:00
confirmation_controller.go Refactor: add a separate Prompt view 2025-09-05 10:42:03 +02:00
context_lines_controller.go Cleanup: use CurrentSide() instead of private currentSidePanel 2026-03-09 19:42:28 +01:00
custom_patch_options_menu_action.go Add Key type 2026-04-30 22:14:26 +02:00
diffing_menu_action.go Remove TrimSpace calls that are no longer needed 2025-11-15 15:38:24 +01:00
files_controller.go Add Key type 2026-04-30 22:14:26 +02:00
filter_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
filtering_menu_action.go Remove TrimSpace calls that are no longer needed 2025-11-15 15:38:24 +01:00
git_flow_controller.go Add Key type 2026-04-30 22:14:26 +02:00
global_controller.go Remove dead Modifier field from keybindings 2026-05-06 09:51:23 +02:00
jump_to_side_window_controller.go Remove dead Modifier field from keybindings 2026-05-06 09:51:23 +02:00
list_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
list_controller_trait.go Enable nolintlint linter, and fix warnings 2025-06-30 18:30:11 +02:00
local_commits_controller.go Add Key type 2026-04-30 22:14:26 +02:00
local_commits_controller_test.go Move isFixupCommit to FixupHelper 2026-01-24 16:04:35 +01:00
main_view_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
menu_controller.go Call OnMenuPress(nil) when hitting esc in a menu 2026-04-01 09:13:55 +02:00
merge_conflicts_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
options_menu_action.go Rename KeepConfirmKeybindings to KeepConflictingKeybindings 2025-12-22 09:37:06 +01:00
patch_building_controller.go Cleanup: remove unnecessary function Label() 2026-04-30 22:14:26 +02:00
patch_explorer_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
patch_explorer_controller_test.go Strip the '+' and '-' characters when copying parts of a diff to the clipboard 2025-04-29 11:33:47 +02:00
prompt_controller.go Add Key type 2026-04-30 22:14:26 +02:00
quit_actions.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
reflog_commits_controller.go Fix showing diffs for renamed file when filtering by path 2025-07-27 12:05:41 +02:00
remote_branches_controller.go Add a prompt for the sort order menus for branches 2025-07-09 13:16:42 +02:00
remotes_controller.go Show PushUrls for selected remote if there are any 2026-05-04 13:09:47 +02:00
remotes_controller_test.go feat: add fork remote command 2025-11-16 17:26:00 +01:00
rename_similarity_threshold_controller.go Cleanup: use CurrentSide() instead of private currentSidePanel 2026-03-09 19:42:28 +01:00
screen_mode_actions.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
scroll_off_margin.go Replace min/max helpers with built-in min/max 2024-04-07 23:24:10 +08:00
scroll_off_margin_test.go Add tests for scroll-off margin of zero 2023-08-21 08:10:28 +02:00
search_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
search_prompt_controller.go Remove dead Modifier field from keybindings 2026-05-06 09:51:23 +02:00
shell_command_action.go Strip leading/trailing whitespace from prompt input 2025-11-15 15:38:24 +01:00
side_window_controller.go Remove dead Modifier field from keybindings 2026-05-06 09:51:23 +02:00
snake_controller.go Cleanup: get rid of the variadic parameter of ContextMgr.Push 2025-04-08 16:08:25 +02:00
staging_controller.go Cleanup: remove unnecessary function Label() 2026-04-30 22:14:26 +02:00
stash_controller.go Localize "Dropping stash" log 2026-04-06 19:06:25 +02:00
status_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
sub_commits_controller.go Use async refresh rather than manual OnWorker call 2025-07-02 16:10:04 +02:00
submodules_controller.go Add Key type 2026-04-30 22:14:26 +02:00
suggestions_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
switch_to_diff_files_controller.go Rename GetOnClick (et al) to GetOnDoubleClick 2026-03-25 14:58:53 +01:00
switch_to_focused_main_view_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
switch_to_sub_commits_controller.go Rename GetOnClick (et al) to GetOnDoubleClick 2026-03-25 14:58:53 +01:00
sync_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
tags_controller.go Add Key type 2026-04-30 22:14:26 +02:00
toggle_whitespace_action.go Move IgnoreWhitespaceInDiffView to user config 2025-07-09 13:15:03 +02:00
undo_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
vertical_scroll_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
view_selection_controller.go Copy gocui files into lazygit repo under pkg/gocui 2026-04-30 14:29:08 +02:00
workspace_reset_controller.go Add Key type 2026-04-30 22:14:26 +02:00
worktree_options_controller.go Remove unnecessary type arguments 2025-03-03 21:24:49 +01:00
worktrees_controller.go Rename GetOnClick (et al) to GetOnDoubleClick 2026-03-25 14:58:53 +01:00