mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-10 20:05:50 +02:00
Fix race condition when starting several command tasks in quick succession (#4518)
- **PR Description** Fixes #4507, see there for an elaborate description of the problem.
This commit is contained in:
commit
8bbfd4b9b9
1 changed files with 2 additions and 2 deletions
|
@ -373,8 +373,6 @@ func (self *ViewBufferManager) NewTask(f func(TaskOpts) error, key string) error
|
|||
go utils.Safe(func() {
|
||||
defer completeGocuiTask()
|
||||
|
||||
self.readLines = nil
|
||||
|
||||
self.taskIDMutex.Lock()
|
||||
self.newTaskID++
|
||||
taskID := self.newTaskID
|
||||
|
@ -400,6 +398,8 @@ func (self *ViewBufferManager) NewTask(f func(TaskOpts) error, key string) error
|
|||
self.stopCurrentTask()
|
||||
}
|
||||
|
||||
self.readLines = nil
|
||||
|
||||
stop := make(chan struct{})
|
||||
notifyStopped := make(chan struct{})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue