From: Doug Coleman Date: Tue, 2 Aug 2022 13:15:11 +0000 (-0500) Subject: editors.notepad: find notepad faster and fix compile error X-Git-Tag: 0.99~1227 X-Git-Url: https://gitweb.factorcode.org/gitweb.cgi?p=factor.git;a=commitdiff_plain;h=b532a1113decfc97228e6d23d495c2b92f556ab4 editors.notepad: find notepad faster and fix compile error --- diff --git a/basis/editors/notepad/notepad.factor b/basis/editors/notepad/notepad.factor index cc672ebc24..5eb20d24ff 100644 --- a/basis/editors/notepad/notepad.factor +++ b/basis/editors/notepad/notepad.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2009 Doug Coleman. ! See http://factorcode.org/license.txt for BSD license. -USING: arrays editors io.directories kernel namespaces -sequences windows.shell32 ; +USING: arrays editors io.directories io.files io.pathnames +kernel namespaces sequences windows.shell32 ; IN: editors.notepad @@ -11,7 +11,10 @@ editor-class [ notepad ] initialize : notepad-path ( -- path ) \ notepad-path get [ - windows-directory t + windows-directory "notepad.exe" append-path + dup file-exists? [ drop f ] unless + ] unless* [ + windows-directory [ "notepad.exe" tail? ] find-file ] unless* ;