1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

allow submodule init and show submodule diff with a prefix

This commit is contained in:
Jesse Duffield
2020-10-01 08:18:16 +10:00
parent f3be2b3e68
commit da3e00823f
12 changed files with 101 additions and 102 deletions

View File

@ -46,7 +46,7 @@ func (m *ViewBufferManager) ReadLines(n int) {
}()
}
func (m *ViewBufferManager) NewCmdTask(r io.Reader, cmd *exec.Cmd, linesToRead int, onDone func()) func(chan struct{}) error {
func (m *ViewBufferManager) NewCmdTask(r io.Reader, cmd *exec.Cmd, prefix string, linesToRead int, onDone func()) func(chan struct{}) error {
return func(stop chan struct{}) error {
go func() {
<-stop
@ -99,6 +99,9 @@ func (m *ViewBufferManager) NewCmdTask(r io.Reader, cmd *exec.Cmd, linesToRead i
loadingMutex.Lock()
if !loaded {
m.beforeStart()
if prefix != "" {
_, _ = m.writer.Write([]byte(prefix))
}
loaded = true
}
loadingMutex.Unlock()