]> gitweb.factorcode.org Git - factor.git/commitdiff
was using each-line from io by accident, dont' even need io in USING: list here
authorU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Mon, 1 Dec 2008 23:53:17 +0000 (17:53 -0600)
committerU-SLAVA-DFB8FF805\Slava <Slava@slava-dfb8ff805.(none)>
Mon, 1 Dec 2008 23:53:17 +0000 (17:53 -0600)
basis/ui/gadgets/editors/editors.factor [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index ad81d18..e262ac7
@@ -1,6 +1,6 @@
 ! Copyright (C) 2006, 2008 Slava Pestov
 ! See http://factorcode.org/license.txt for BSD license.
-USING: accessors arrays documents io kernel math models
+USING: accessors arrays documents kernel math models
 namespaces locals fry make opengl opengl.gl sequences strings
 io.styles math.vectors sorting colors combinators assocs
 math.order fry calendar alarms ui.clipboards ui.commands
@@ -218,7 +218,7 @@ M: editor ungraft*
     ] with-editor-translation ;
 
 : selection-start/end ( editor -- start end )
-    dup editor-mark* swap editor-caret* sort-pair ;
+    [ editor-mark* ] [ editor-caret* ] bi sort-pair ;
 
 : (draw-selection) ( x1 x2 -- )
     over -
@@ -227,9 +227,8 @@ M: editor ungraft*
     swap [ gl-fill-rect ] with-translation ;
 
 : draw-selected-line ( start end n -- )
-    [ start/end-on-line ] keep tuck
-    [ editor get offset>x ] 2dip
-    editor get offset>x
+    [ start/end-on-line ] keep
+    tuck [ editor get offset>x ] 2bi@
     (draw-selection) ;
 
 : draw-selection ( -- )
@@ -237,9 +236,9 @@ M: editor ungraft*
     editor get selection-start/end
     over first [
         2dup [
-            [ 2dup ] dip draw-selected-line
+            draw-selected-line
             1 translate-lines
-        ] each-line 2drop
+        ] with with each-line
     ] with-editor-translation ;
 
 M: editor draw-gadget*