forked from factor/factor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
editors.notepadnext: support line numbers in newer bundle id
- Loading branch information
Showing
1 changed file
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,33 @@ | ||
! Copyright (C) 2024 Doug Coleman. | ||
! See https://factorcode.org/license.txt for BSD license. | ||
USING: editors io.pathnames io.standard-paths kernel make system ; | ||
USING: editors io.pathnames io.standard-paths kernel make sequences system ; | ||
IN: editors.notepadnext | ||
|
||
SINGLETON: notepadnext | ||
|
||
HOOK: find-notepadnext-path os ( -- path ) | ||
HOOK: find-notepadnext-path os ( -- path line#? ) | ||
|
||
M: macosx find-notepadnext-path | ||
"com.yourcompany.NotepadNext" find-native-bundle [ | ||
"Contents/MacOS/NotepadNext" append-path | ||
] [ | ||
f | ||
] if* ; | ||
{ | ||
"com.yourcompany.NotepadNext" | ||
"io.github.dail8859.NotepadNext" | ||
} [ | ||
find-native-bundle [ | ||
"Contents/MacOS/NotepadNext" append-path | ||
] [ | ||
f | ||
] if* | ||
] map-find "io.github.dail8859.NotepadNext" = ; | ||
|
||
M: windows find-notepadnext-path | ||
{ "Notepad Next" } "NotepadNext.exe" find-in-applications | ||
[ "NotepadNext.exe" ] unless* ; | ||
[ "NotepadNext.exe" ] unless* t ; | ||
|
||
M: linux find-notepadnext-path | ||
"NotepadNext" find-in-path ; | ||
"NotepadNext" find-in-path t ; | ||
|
||
M: notepadnext editor-command | ||
'[ | ||
find-notepadnext-path , _ , | ||
"-n" , _ , | ||
find-notepadnext-path | ||
[ , _ , ] [ [ "-n" , _ , ] when ] bi* | ||
] { } make ; |