summaryrefslogtreecommitdiffstats
path: root/pkg/gui/gui.go
diff options
context:
space:
mode:
authorJesse Duffield <jessedduffield@gmail.com>2023-08-02 20:53:24 +1000
committerJesse Duffield <jessedduffield@gmail.com>2023-08-02 21:50:44 +1000
commit92f0aa23cc600acc0ab1bf61339912c750a26418 (patch)
tree649fba5b1f600e0f2a2a13c1938b0de0b97f03dc /pkg/gui/gui.go
parentc8520fbe78453b7c593a1071a3cdc3295ad47772 (diff)
Remove file watcher code
Now that we refresh upon focus, we can scrap this file watching code. Stefan says few git UIs use file watching, and I understand why: the reason this code was problematic in the first place is that watching files is expensive and if you have too many open file handles that can cause problems. Importantly: this code that's being removed was _already_ dead.
Diffstat (limited to 'pkg/gui/gui.go')
-rw-r--r--pkg/gui/gui.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index ad3dc3e34..4be909dc8 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -72,7 +72,6 @@ type Gui struct {
Updater *updates.Updater
statusManager *status.StatusManager
waitForIntro sync.WaitGroup
- fileWatcher *fileWatcher
viewBufferManagerMap map[string]*tasks.ViewBufferManager
// holds a mapping of view names to ptmx's. This is for rendering command outputs
// from within a pty. The point of keeping track of them is so that if we re-size
@@ -476,8 +475,6 @@ func NewGui(
afterLayoutFuncs: make(chan func() error, 1000),
}
- gui.WatchFilesForChanges()
-
gui.PopupHandler = popup.NewPopupHandler(
cmn,
func(ctx goContext.Context, opts types.CreatePopupPanelOpts) error {
@@ -680,10 +677,6 @@ func (gui *Gui) RunAndHandleError(startArgs appTypes.StartArgs) error {
manager.Close()
}
- if !gui.fileWatcher.Disabled {
- gui.fileWatcher.Watcher.Close()
- }
-
close(gui.stopChan)
switch err {