diff options
-rw-r--r-- | ui/message-view.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/message-view.go b/ui/message-view.go index 71d1cba..ca03e73 100644 --- a/ui/message-view.go +++ b/ui/message-view.go @@ -231,6 +231,12 @@ func (view *MessageView) replaceBuffer(original messages.UIMessage, new messages } } + if start == -1 { + debug.Print("Called replaceBuffer() with message that was not in the buffer:", original) + view.appendBuffer(new) + return + } + if len(view.textBuffer) > end { end++ } |