jesseduffield.lazygit/pkg/integration/tests
Stefan Haller e90a3dc666 Fix view selection running out of sync with list selection when view isn't focused
When rerendering a view at the end of a refresh, we call HandleFocus only if the
view has the focus. This is so that we rerender the main view for the new
selection.

What was missing here is to update the view selection from the list selection if
the view doesn't have the focus, so that the selection is painted properly.
Normally this is not relevant because you don't see the selection if another
side panel has the focus; however, you do see it as an inactive selection when
e.g. a popup is shown, in which case it does matter.

This will become more important when we introduce section headers for commits,
because in that case the view selection needs to change when the working copy
state changes from normal to rebasing or vice versa, even if the list selection
stays the same.

The changed test submodule/reset.go shows how this was wrong before: when
entering the submodule again after resetting, there is a refresh which keeps the
same branch selected as before (master); however, since the branches panel is
not focused, the view didn't notice and kept thinking that the detached head is
selected (which it isn't, you can tell by running the test in sandbox mode and
focusing the branches panel at the end: you'll see that master is selected). So
the change in this commit fixes that.
2025-04-20 16:06:15 +02:00
..
bisect Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
branch Show original todo action instead of "conflict", and show <-- CONFLICT instead 2025-04-20 15:55:44 +02:00
cherry_pick Allow cherry-picking merge commits 2025-04-20 15:59:48 +02:00
commit Support range selection for reverting commits 2025-04-20 16:03:06 +02:00
config Add an integration test for a config with a negative refspec 2025-03-11 08:33:41 +01:00
conflicts Mention which command is continued in PromptToContinueRebase 2025-04-20 15:53:17 +02:00
custom_commands Add runCommand function to Go template syntax 2025-04-09 10:44:36 +02:00
demo Add number of commits to cherry-pick confirmation prompt 2025-01-08 21:08:42 -08:00
diff Add "Absolute path" item to the file view's copy menu 2025-03-25 10:00:56 +01:00
file Mention which command is continued in PromptToContinueRebase 2025-04-20 15:53:17 +02:00
filter_and_search Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
filter_by_author Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
filter_by_path Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
interactive_rebase Support range selection for reverting commits 2025-04-20 16:03:06 +02:00
misc Cleanup: simplify and tighten test expectations related to clipboard 2025-02-19 18:50:12 +01:00
patch_building Mention which command is continued in PromptToContinueRebase 2025-04-20 15:53:17 +02:00
reflog Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
shared Construct arg vector manually rather than parse string 2023-05-23 19:49:19 +10:00
shell_commands Rename "Custom Command" to "Shell Command" 2024-08-17 10:56:03 +02:00
staging Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
stash feat: Implement range stash drop 2025-04-02 17:34:35 +08:00
status Use getters for AppState and UserConfig instead of accessing the fields directly 2024-08-18 10:24:52 +02:00
submodule Fix view selection running out of sync with list selection when view isn't focused 2025-04-20 16:06:15 +02:00
sync Show original todo action instead of "conflict", and show <-- CONFLICT instead 2025-04-20 15:55:44 +02:00
tag Cleanup: simplify and tighten test expectations related to clipboard 2025-02-19 18:50:12 +01:00
ui Disable global keybinds while popups are active 2025-02-23 08:44:48 +01:00
undo Add a root item ("/") if files at top level have changed 2025-03-21 08:04:58 +01:00
worktree Fix typos 2025-01-03 10:50:36 +11:00
test_list.go Allow cherry-picking merge commits 2025-04-20 15:59:48 +02:00
test_list_generator.go Fix typos 2025-01-03 10:50:36 +11:00
tests.go Set working directory in lazygit test command 2024-01-12 19:59:31 +11:00