     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 ;

    [ drag-selection-mark ] 3bi ;

: drag-selection ( editor -- )
    dup drag-caret&mark
    pick mark>> set-model
    swap caret>> set-model ;

: editor-cut ( editor clipboard -- )
    [ gadget-copy ] [ drop remove-selection ] 2bi ;

    } cond ;

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

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