From a9b767f353dab6e1079930bbc7b8a53187f01e81 Mon Sep 17 00:00:00 2001 From: Mohsen Mirzakhani Date: Sat, 1 Nov 2025 11:34:07 +0100 Subject: [PATCH] Paint selection color after rendering the text --- editor.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/editor.go b/editor.go index a6fd569..eb58b92 100644 --- a/editor.go +++ b/editor.go @@ -254,10 +254,10 @@ func (e *Editor) layout(gtx layout.Context) layout.Dimensions { } if e.Len() > 0 { - e.paintSelection(gtx, selectColor) + e.paintText(gtx, textMaterial) e.paintLineHighlight(gtx, lineColor) e.text.HighlightMatchingBrackets(gtx, selectColor.Op(gtx.Ops)) - e.paintText(gtx, textMaterial) + e.paintSelection(gtx, selectColor) } if gtx.Enabled() { e.paintCaret(gtx, textMaterial)