From ea5907993337c0b69cc92b0d29d7a04d917af8ad Mon Sep 17 00:00:00 2001 From: Dongdong Zhou Date: Thu, 27 Sep 2018 18:09:15 +0100 Subject: [PATCH] draw unformatted text --- editor/buffer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/editor/buffer.go b/editor/buffer.go index e0914a2d..8047ce50 100644 --- a/editor/buffer.go +++ b/editor/buffer.go @@ -223,7 +223,8 @@ func (b *Buffer) drawLine(painter *gui.QPainter, font *Font, index int, y int, p fg := b.editor.theme.Theme.Foreground color.SetRgb(fg.R, fg.G, fg.B, fg.A) painter.SetPen2(color) - painter.DrawText3(padding, y+int(font.shift), line.text) + text := strings.Replace(string(line.text), "\t", b.tabStr, -1) + painter.DrawText3(padding, y+int(font.shift), text) } }