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 ; control-self relayout ;
: draw-caret ( -- ) : draw-caret ( -- )
editor get editor get editor-focused? [
dup editor-caret-color gl-color editor get
caret-rect rect-extent gl-line ; dup editor-caret-color gl-color
caret-rect rect-extent gl-line
] when ;
: translate-lines ( n editor -- ) : translate-lines ( n editor -- )
line-height * 0.0 swap 0.0 glTranslated ; line-height * 0.0 swap 0.0 glTranslated ;