diff options
author | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-01 08:18:16 +1000 |
---|---|---|
committer | Jesse Duffield <jessedduffield@gmail.com> | 2020-10-02 08:09:42 +1000 |
commit | da3e00823f733743c2bd8076d13955dbed9fcbae (patch) | |
tree | 0b9a5dfa358fe8e1d0b0d53ebb897282548a4581 /pkg/tasks | |
parent | f3be2b3e68a49742ee88053a1d029926bc0d1819 (diff) |
allow submodule init and show submodule diff with a prefix
Diffstat (limited to 'pkg/tasks')
-rw-r--r-- | pkg/tasks/tasks.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tasks/tasks.go b/pkg/tasks/tasks.go index 56fe81db0..f6e3432f2 100644 --- a/pkg/tasks/tasks.go +++ b/pkg/tasks/tasks.go @@ -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() |