@@ -231,11 +231,17 @@ class SCSHBaseXPCService: NSObject {
231
231
hlArguments. arguments. append ( " --data-dir= \( dataDir) " )
232
232
}
233
233
234
- if hlArguments. theme. hasPrefix ( " ! " ) {
235
- // Custom theme.
236
- hlArguments. theme. remove ( at: hlArguments. theme. startIndex)
237
- if let theme_url = self . getCustomThemesUrl ( createIfMissing: false ) ? . appendingPathComponent ( hlArguments. theme) . appendingPathExtension ( " theme " ) {
238
- hlArguments. arguments. append ( " --config-file= \( theme_url. path) " )
234
+ if custom_settings. themeLua. isEmpty {
235
+ if hlArguments. theme. hasPrefix ( " ! " ) {
236
+ // Custom theme.
237
+ hlArguments. theme. remove ( at: hlArguments. theme. startIndex)
238
+ if let theme_url = self . getCustomThemesUrl ( createIfMissing: false ) ? . appendingPathComponent ( hlArguments. theme) . appendingPathExtension ( " theme " ) {
239
+ hlArguments. arguments. append ( " --style= \( theme_url. path) " )
240
+ }
241
+ } else if let dataDir = self . dataDir {
242
+ hlArguments. arguments. append ( " --style= \( dataDir) /themes/ \( hlArguments. theme) .theme " )
243
+ } else {
244
+ hlArguments. arguments. append ( " --style= \( hlArguments. theme) " )
239
245
}
240
246
}
241
247
@@ -374,21 +380,17 @@ class SCSHBaseXPCService: NSObject {
374
380
temporaryThemeFile = URL ( fileURLWithPath: directory) . appendingPathComponent ( NSUUID ( ) . uuidString) . appendingPathExtension ( " theme " )
375
381
do {
376
382
try inline_theme. write ( to: temporaryThemeFile!, atomically: true , encoding: . utf8)
377
- colorize. arguments. append ( " --config-file = \( temporaryThemeFile!. path) " )
383
+ colorize. arguments. append ( " --style = \( temporaryThemeFile!. path) " )
378
384
} catch {
379
385
temporaryThemeFile = nil
380
386
}
381
387
}
382
388
383
-
384
389
colorize. env. merge ( [
385
390
// Highlight path
386
391
" pathHL " : colorize. highlight,
387
392
" pathDos2unix " : self . bundle. path ( forResource: " dos2unix " , ofType: nil ) ?? " dos2unix " ,
388
393
389
- // Theme to use.
390
- " themeHL " : colorize. theme,
391
-
392
394
" extraFlagsHL " : colorize. arguments. joined ( separator: " • " ) ,
393
395
] ) { ( _, new) in new }
394
396
0 commit comments