diff options
author | Stefan Haller <stefan@haller-berlin.de> | 2024-04-14 20:06:25 +0200 |
---|---|---|
committer | Stefan Haller <stefan@haller-berlin.de> | 2024-04-18 10:10:30 +0200 |
commit | 1869fda8006731ecc15b748028ce1b9742a4c756 (patch) | |
tree | f4f3793d6bcd55d14db39c6919c943b30a0848a6 /pkg/gui/types | |
parent | 5396a706611220077d32d01058d5e4b025eab0de (diff) |
Make OnWorker callback return an error
This lets us get rid of a few more calls to Error(), and it simplifies things
for clients of OnWorker: they can simply return an error from their callback
like we do everywhere else.
Diffstat (limited to 'pkg/gui/types')
-rw-r--r-- | pkg/gui/types/common.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/gui/types/common.go b/pkg/gui/types/common.go index 694cdcc56..6675668b0 100644 --- a/pkg/gui/types/common.go +++ b/pkg/gui/types/common.go @@ -85,7 +85,7 @@ type IGuiCommon interface { OnUIThread(f func() error) // Runs a function in a goroutine. Use this whenever you want to run a goroutine and keep track of the fact // that lazygit is still busy. See docs/dev/Busy.md - OnWorker(f func(gocui.Task)) + OnWorker(f func(gocui.Task) error) // Function to call at the end of our 'layout' function which renders views // For example, you may want a view's line to be focused only after that view is // resized, if in accordion mode. |