From b532a1113decfc97228e6d23d495c2b92f556ab4 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Tue, 2 Aug 2022 08:15:11 -0500 Subject: [PATCH] editors.notepad: find notepad faster and fix compile error --- basis/editors/notepad/notepad.factor | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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* ; -- 2.34.1