Hide the caret if we don't have focus

slava 2006-08-04 02:01:24 +00:00
parent 473348b3dc
commit 402a102fa4
1 changed files with 5 additions and 3 deletions

View File

@ -129,9 +129,11 @@ M: loc-monitor model-changed ( obj -- )
control-self relayout ;
: draw-caret ( -- )
editor get editor-focused? [
editor get
dup editor-caret-color gl-color
caret-rect rect-extent gl-line ;
caret-rect rect-extent gl-line
] when ;
: translate-lines ( n editor -- )
line-height * 0.0 swap 0.0 glTranslated ;