jesseduffield.lazygit/pkg/gui
Stefan Haller 4dfa4e8aa2 Allow more than one controller to attach OnFocus/OnFocusLost functions
Trying to do this would previously have the second one silently overwrite the
first one's.

We don't currently have this in lazygit, but I ran into the situation once
during development, and it can lead to bugs that are hard to diagnose.

Instead of holding a list of functions, we could also have added a panic in case
the function was set already; this would have been good enough for the current
state, and enough to catch mistakes early in the future. However, I decided to
allow multiple controllers to attach these functions, because I can't see a
reason not to.
2025-07-11 10:51:44 +02:00
..
context Allow more than one controller to attach OnFocus/OnFocusLost functions 2025-07-11 10:51:44 +02:00
controllers Fix stale main view content when entering/exiting filtering view 2025-07-09 16:00:46 +02:00
filetree Enable revive linter, and fix a bunch of warnings 2025-06-30 19:13:20 +02:00
keybindings Enable revive linter, and fix a bunch of warnings 2025-06-30 19:13:20 +02:00
mergeconflicts Enable revive linter, and fix a bunch of warnings 2025-06-30 19:13:20 +02:00
modes Make Commit.Hash a getter for an unexported hash field 2025-04-29 14:57:15 +02:00
patch_exploring Fix scrolling hunk into view when selecting next hunk 2025-07-07 13:42:10 +02:00
popup Add convenience function ConfirmIf 2025-07-08 16:41:22 +02:00
presentation Enable revive linter, and fix a bunch of warnings 2025-06-30 19:13:20 +02:00
services/custom_commands Change Refresh to not return an error 2025-07-02 16:09:42 +02:00
status Move Loader to presentation package 2025-05-06 09:52:53 +02:00
style Add function to render a hyperlink 2024-08-24 10:36:01 +02:00
types Allow more than one controller to attach OnFocus/OnFocusLost functions 2025-07-11 10:51:44 +02:00
background.go Change Refresh to not return an error 2025-07-02 16:09:42 +02:00
command_log_panel.go Fix warning QF1004: could use strings.ReplaceAll instead 2025-06-30 18:30:11 +02:00
context.go Add ContextMgr.NextInStack and use it to access side panel of focused main view 2025-05-22 14:38:40 +02:00
context_config.go Remove some unused code 2025-07-08 15:14:45 +02:00
controllers.go Allow more than one controller to attach OnFocus/OnFocusLost functions 2025-07-11 10:51:44 +02:00
dummies.go Move NewDummyCommon to pkg/common 2025-05-06 09:43:26 +02:00
editors.go Show "hooks disabled" in title bar of commit message editor 2025-04-10 08:57:32 +02:00
extras_panel.go Add pageUp/pageDown/top/bottom keybindings to focused command log panel 2025-04-08 16:11:15 +02:00
global_handlers.go Fix warning QF1004: could use strings.ReplaceAll instead 2025-06-30 18:30:11 +02:00
gui.go Remove deprecated edit configs 2025-07-08 16:32:21 +02:00
gui_common.go Change Refresh to not return an error 2025-07-02 16:09:42 +02:00
gui_driver.go Fix clicking multiple times in an integration test 2024-10-18 10:06:52 +02:00
information_panel.go Enable revive linter, and fix a bunch of warnings 2025-06-30 19:13:20 +02:00
keybindings.go Fix warning ST1016: methods on the same type should have the same receiver name 2025-06-30 18:30:11 +02:00
layout.go Bump gocui and adapt lazygit code 2025-06-05 13:20:38 +02:00
main_panels.go Fix race with PTYs in integration tests 2025-03-28 11:16:04 +01:00
menu_panel.go Cleanup: get rid of the variadic parameter of ContextMgr.Push 2025-04-08 16:08:25 +02:00
options_map.go Make WorkingTreeState a struct, and add cherry-picking and reverting states 2025-04-20 15:53:17 +02:00
pty.go Fix race with PTYs in integration tests 2025-03-28 11:16:04 +01:00
pty_windows.go Format code to pass lint 2021-09-16 21:38:43 +08:00
recent_repos_panel.go Remove unused field gui.IsNewRepo 2024-12-01 10:44:26 +01:00
tasks_adapter.go Change NewRenderStringWith{out}ScrollTask to reuse the task key of the existing task 2024-10-18 22:46:47 +02:00
test_mode.go Don't wait in integration tests when running in headless mode 2024-06-05 14:44:02 +02:00
view_helpers.go Add ContextMgr.NextInStack and use it to access side panel of focused main view 2025-05-22 14:38:40 +02:00
views.go add bold style for border 2025-06-15 16:28:20 +02:00