jesseduffield.lazygit/pkg/gui/controllers
Stefan Haller 8f3e59b78e Don't render staging view when it loses focus
As far as I understand, this was needed back when the staging context was still
responsible for rendering its highlight (as opposed to the gocui view, as it is
today). It was necessary to call it with isFocused=false so that it removed the
highlight. The isFocused bool is no longer used today (and we'll remove it in
the next commit), so there's no need to render the view here any more.

This fixes flickering when leaving the staging view by pressing escape. The
reason is that in this case the patch state was already set to nil by the time
we get here, so we would render an empty view for a brief moment.

On top of that, it fixes unwanted scrolling to the top when leaving the staging
view. The reason for this is that we have code in layout that scrolls views up
if needed, e.g. because the window got taller or the view content got shorter
(added in #3839). This kicked in because we emptied the view, and scrolled it
all the way to the top, which we don't want.
2024-10-18 22:46:47 +02:00
..
helpers Allow pasting commits more than once 2024-10-13 16:55:54 +02:00
attach.go Begin refactoring gui 2023-04-30 13:19:52 +10:00
base_controller.go Remove return value of Focus-related functions 2024-09-06 08:45:48 +02:00
basic_commits_controller.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
bisect_controller.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
branches_controller.go Add a menu item to delete both local and remote branch at once 2024-09-28 11:23:21 +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 Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
commit_message_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
commits_files_controller.go Get rid of error return value of PostRefreshUpdate and a few related ones 2024-10-13 16:55:54 +02:00
common.go lots of changes 2023-04-30 13:19:53 +10:00
confirmation_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
context_lines_controller.go Remove return value of RenderToMainViews and some related functions 2024-09-06 08:45:48 +02:00
custom_patch_options_menu_action.go Remove return value of OpenCommitMessagePanel 2024-09-06 08:45:48 +02:00
diffing_menu_action.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
files_controller.go Get rid of error return value of PostRefreshUpdate and a few related ones 2024-10-13 16:55:54 +02:00
filter_controller.go Introduce filtered list view model 2023-07-03 12:54:13 +10:00
filtering_menu_action.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
git_flow_controller.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
global_controller.go Rename "Custom Command" to "Shell Command" 2024-08-17 10:56:03 +02:00
jump_to_side_window_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
list_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
list_controller_trait.go Remove ErrorMsg 2024-04-18 10:10:30 +02:00
local_commits_controller.go Get rid of error return value of PostRefreshUpdate and a few related ones 2024-10-13 16:55:54 +02:00
local_commits_controller_test.go Keep the same line selected after squashing fixup commits 2024-03-09 07:55:22 +01:00
menu_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
merge_conflicts_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
options_menu_action.go Replace CurrentContext() with Context().Current() 2024-08-17 11:14:51 +02:00
patch_building_controller.go Get rid of error return value of PostRefreshUpdate and a few related ones 2024-10-13 16:55:54 +02:00
patch_explorer_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
quit_actions.go Get rid of error return value of PostRefreshUpdate and a few related ones 2024-10-13 16:55:54 +02:00
reflog_commits_controller.go Remove return value of RenderToMainViews and some related functions 2024-09-06 08:45:48 +02:00
remote_branches_controller.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
remotes_controller.go Get rid of error return value of PostRefreshUpdate and a few related ones 2024-10-13 16:55:54 +02:00
rename_similarity_threshold_controller.go Remove return value of RenderToMainViews and some related functions 2024-09-06 08:45:48 +02:00
screen_mode_actions.go Remove return value of HandleRender 2024-09-06 08:45:48 +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 Enforce single-item selection in various actions 2024-01-19 10:50:49 +11:00
shell_command_action.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
side_window_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
snake_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
staging_controller.go Don't render staging view when it loses focus 2024-10-18 22:46:47 +02:00
stash_controller.go Add options for disabling switching to the Files panel after popping or applying a stash 2024-09-15 11:59:59 +02:00
status_controller.go Use AutoRenderHyperLinks in main views 2024-09-28 12:04:51 +02:00
sub_commits_controller.go Remove return value of Focus-related functions 2024-09-06 08:45:48 +02:00
submodules_controller.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
suggestions_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
switch_to_diff_files_controller.go Remove return value of IContextMgr.Push/Pop et. al. 2024-09-06 08:45:48 +02:00
switch_to_sub_commits_controller.go Set groundwork for better disabled reasons with range select 2024-01-23 13:03:37 +11:00
sync_controller.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
tags_controller.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
toggle_whitespace_action.go Remove return value of Focus-related functions 2024-09-06 08:45:48 +02:00
undo_controller.go Remove return value of Alert/Confirm/Prompt 2024-09-06 08:45:48 +02:00
vertical_scroll_controller.go Change direct access to Common.UserConfig to a getter 2024-08-18 10:24:52 +02:00
workspace_reset_controller.go Get rid of error return value of PostRefreshUpdate and a few related ones 2024-10-13 16:55:54 +02:00
worktree_options_controller.go Set groundwork for better disabled reasons with range select 2024-01-23 13:03:37 +11:00
worktrees_controller.go Remove return value of RenderToMainViews and some related functions 2024-09-06 08:45:48 +02:00