diff --git a/library/ui/text/editor.factor b/library/ui/text/editor.factor index 0d6102b25a..e1b6318c37 100644 --- a/library/ui/text/editor.factor +++ b/library/ui/text/editor.factor @@ -129,9 +129,11 @@ M: loc-monitor model-changed ( obj -- ) control-self relayout ; : draw-caret ( -- ) - editor get - dup editor-caret-color gl-color - caret-rect rect-extent gl-line ; + editor get editor-focused? [ + editor get + dup editor-caret-color gl-color + caret-rect rect-extent gl-line + ] when ; : translate-lines ( n editor -- ) line-height * 0.0 swap 0.0 glTranslated ;