     editor new-editor ;
 
 : activate-editor-model ( editor model -- )
-    2dup add-connection
-    dup activate-model
-    swap model>> add-loc ;
+    [ add-connection ]
+    [ nip activate-model ]
+    [ swap model>> add-loc ] 2tri ;
 
 : deactivate-editor-model ( editor model -- )
-    2dup remove-connection
-    dup deactivate-model
-    swap model>> remove-loc ;
+    [ remove-connection ]
+    [ nip deactivate-model ]
+    [ swap model>> remove-loc ] 2tri ;
 
 : blink-caret ( editor -- )
     [ not ] change-blink relayout-1 ;

    } cond ;

: clicked-loc ( editor -- loc )
    [ hand-rel ] keep point>loc ;

: click-loc ( editor model -- )
    [ clicked-loc ] dip set-model ;


: drag-selection-caret ( loc editor element -- loc )
    [
        [ drag-direction? ] [ model>> ] 2bi
    ] dip prev/next-elt ? ;

: drag-selection-mark ( loc editor element -- loc )
