Skip to content

Commit

Permalink
editors.notepadnext: support line numbers in newer bundle id
Browse files Browse the repository at this point in the history
  • Loading branch information
mrjbq7 committed Apr 3, 2024
1 parent 2ecfad7 commit fc37964
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions basis/editors/notepadnext/notepadnext.factor
@@ -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 ;

0 comments on commit fc37964

Please sign in to comment.