aboutsummaryrefslogtreecommitdiff
path: root/ui/messages/html/codeblock.go
diff options
context:
space:
mode:
authorTulir Asokan <tulir@maunium.net>2019-04-10 21:06:19 +0300
committerTulir Asokan <tulir@maunium.net>2019-04-10 21:06:19 +0300
commitdb0e24ccc268d0a9c7575d660a9397e53747894b (patch)
treec6b3f858cfee7d73ba472842b0f1d4423f118b9a /ui/messages/html/codeblock.go
parent9132e2b7507c92fc1e49729298344f5d2ed3e9b3 (diff)
Use already parsed events for replies if possible
Diffstat (limited to 'ui/messages/html/codeblock.go')
-rw-r--r--ui/messages/html/codeblock.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/messages/html/codeblock.go b/ui/messages/html/codeblock.go
index ec6181d..4a0766c 100644
--- a/ui/messages/html/codeblock.go
+++ b/ui/messages/html/codeblock.go
@@ -37,6 +37,13 @@ func NewCodeBlockEntity(children []Entity, background tcell.Style) *CodeBlockEnt
}
}
+func (ce *CodeBlockEntity) Clone() Entity {
+ return &CodeBlockEntity{
+ BaseEntity: ce.BaseEntity.Clone().(*BaseEntity),
+ Background: ce.Background,
+ }
+}
+
func (ce *CodeBlockEntity) Draw(screen mauview.Screen) {
screen.Fill(' ', ce.Background)
ce.BaseEntity.Draw(screen)