diff --git a/basis/editors/editors.factor b/basis/editors/editors.factor index 38978d3dc2..b7a420c6d1 100644 --- a/basis/editors/editors.factor +++ b/basis/editors/editors.factor @@ -39,6 +39,14 @@ M: cannot-find-source error. definition>> pprint-short "''" print ; +: edit-file ( path -- ) + 0 edit-location ; + +DEFER: edit + +: edit-vocab ( vocab -- ) + dup lookup-vocab [ edit ] [ cannot-find-source ] ?if ; + GENERIC: edit ( object -- ) M: object edit @@ -46,8 +54,7 @@ M: object edit M: link edit name>> edit ; -M: string edit - dup lookup-vocab [ edit ] [ cannot-find-source ] ?if ; +M: string edit edit-vocab ; : edit-error ( error -- ) [ error-file ] [ error-line ] bi diff --git a/basis/ui/tools/operations/operations.factor b/basis/ui/tools/operations/operations.factor index 5ae86f4a13..fe8bb95623 100644 --- a/basis/ui/tools/operations/operations.factor +++ b/basis/ui/tools/operations/operations.factor @@ -69,9 +69,6 @@ IN: ui.tools.operations { +secondary+ t } } define-operation -! Pathnames -: edit-file ( pathname -- ) edit ; - [ pathname? ] \ edit-file H{ { +keyboard+ T{ key-down f { C+ } "b" } } { +primary+ t }