mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 20:36:03 +02:00
some refactoring in anticipation of the graph feature
This commit is contained in:
parent
7a464ae5b7
commit
2fc1498517
40 changed files with 523 additions and 411 deletions
|
@ -131,7 +131,6 @@ func (m *ViewBufferManager) NewCmdTask(r io.Reader, cmd *exec.Cmd, prefix string
|
|||
|
||||
select {
|
||||
case <-stop:
|
||||
m.refreshView()
|
||||
break outer
|
||||
default:
|
||||
}
|
||||
|
@ -139,18 +138,18 @@ func (m *ViewBufferManager) NewCmdTask(r io.Reader, cmd *exec.Cmd, prefix string
|
|||
// if we're here then there's nothing left to scan from the source
|
||||
// so we're at the EOF and can flush the stale content
|
||||
m.onEndOfInput()
|
||||
m.refreshView()
|
||||
break outer
|
||||
}
|
||||
_, _ = m.writer.Write(append(scanner.Bytes(), '\n'))
|
||||
}
|
||||
m.refreshView()
|
||||
case <-stop:
|
||||
m.refreshView()
|
||||
break outer
|
||||
}
|
||||
}
|
||||
|
||||
m.refreshView()
|
||||
|
||||
if err := cmd.Wait(); err != nil {
|
||||
// it's fine if we've killed this program ourselves
|
||||
if !strings.Contains(err.Error(), "signal: killed") {
|
||||
|
@ -158,8 +157,6 @@ func (m *ViewBufferManager) NewCmdTask(r io.Reader, cmd *exec.Cmd, prefix string
|
|||
}
|
||||
}
|
||||
|
||||
m.refreshView()
|
||||
|
||||
if onDone != nil {
|
||||
onDone()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue