]> gitweb.factorcode.org Git - factor.git/commitdiff
editors.sublime: keep Sublime Text 2 support like we do on OS X.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 Jun 2015 22:34:11 +0000 (15:34 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 1 Jun 2015 22:34:32 +0000 (15:34 -0700)
basis/editors/sublime/sublime.factor

index 33538970906206d0d9e678d388342cf54af6bf5c..df08f603c784ca5b907940d0c030c898c549a2c6 100644 (file)
@@ -1,7 +1,8 @@
 ! Copyright (C) 2013 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: editors io.pathnames io.standard-paths kernel make
-math.parser namespaces sequences system ;
+USING: combinators.short-circuit editors io.pathnames
+io.standard-paths kernel make math.parser namespaces sequences
+system ;
 IN: editors.sublime
 
 SINGLETON: sublime
@@ -19,7 +20,11 @@ M: macosx find-sublime-path
     ] if* ;
 
 M: windows find-sublime-path
-    { "Sublime Text 3" } "subl.exe" find-in-applications ;
+    {
+        [ { "Sublime Text 3" } "subl.exe" find-in-applications ]
+        [ { "Sublime Text 2" } "sublime_text.exe" find-in-applications ]
+        [ "subl.exe" ]
+    } 0|| ;
 
 : sublime-path  ( -- path )
     \ sublime-path get [