diff --git a/operation.go b/operation.go index 4c31624..a5f32fa 100644 --- a/operation.go +++ b/operation.go @@ -385,7 +385,7 @@ func (o *Operation) Runes() ([]rune, error) { listener.OnChange(nil, 0, 0) } - o.buf.Refresh(nil) // print prompt + o.buf.PrintPrompt() // print prompt o.t.KickRead() select { case r := <-o.outchan: diff --git a/runebuf.go b/runebuf.go index 1e054c0..4e4627c 100644 --- a/runebuf.go +++ b/runebuf.go @@ -471,6 +471,12 @@ func (r *RuneBuffer) SetOffset(offset string) { r.Unlock() } +func (r *RuneBuffer) PrintPrompt() { + r.Lock() + r.print() + r.Unlock() +} + func (r *RuneBuffer) print() { r.w.Write(r.output()) r.hadClean = false