summaryrefslogtreecommitdiffstats
path: root/pkg/gui/file_watching.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gui/file_watching.go')
-rw-r--r--pkg/gui/file_watching.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gui/file_watching.go b/pkg/gui/file_watching.go
index 09b994a14..41f1ff837 100644
--- a/pkg/gui/file_watching.go
+++ b/pkg/gui/file_watching.go
@@ -6,6 +6,7 @@ import (
"github.com/fsnotify/fsnotify"
"github.com/jesseduffield/lazygit/pkg/commands/models"
+ "github.com/jesseduffield/lazygit/pkg/utils"
"github.com/sirupsen/logrus"
)
@@ -120,7 +121,7 @@ func (gui *Gui) watchFilesForChanges() {
if gui.fileWatcher.Disabled {
return
}
- go func() {
+ go utils.Safe(func() {
for {
select {
// watch for events
@@ -141,5 +142,5 @@ func (gui *Gui) watchFilesForChanges() {
}
}
}
- }()
+ })
}