@@ -119,7 +119,6 @@ type Editor struct {
119
119
side * WorkspaceSide
120
120
savedGeometry * core.QByteArray
121
121
prefixToMapMetaKey string
122
- macAppArg string
123
122
configDir string
124
123
homeDir string
125
124
version string
@@ -132,7 +131,6 @@ type Editor struct {
132
131
notifications []* Notification
133
132
workspaces []* Workspace
134
133
args []string
135
- ppid int
136
134
keyControl core.Qt__Key
137
135
keyCmd core.Qt__Key
138
136
windowSize [2 ]int
@@ -243,13 +241,12 @@ func InitEditor(options Options, args []string) {
243
241
e .putLog ("Detecting the goneovim configuration directory:" , e .configDir )
244
242
e .overwriteConfigByCLIOption ()
245
243
246
- // get parent process id
247
- e .ppid = os .Getppid ()
248
- e .putLog ("finished getting ppid" )
249
-
250
244
// put shell environment
251
245
e .setEnvironmentVariables ()
252
246
247
+ // set application working directory path
248
+ e .setAppDirPath (e .homeDir )
249
+
253
250
// create qapplication
254
251
e .putLog ("start generating the application" )
255
252
core .QCoreApplication_SetAttribute (core .Qt__AA_EnableHighDpiScaling , true )
@@ -504,15 +501,8 @@ func (e *Editor) setAppDirPath(home string) {
504
501
if runtime .GOOS == "windows" {
505
502
return
506
503
}
507
- if runtime .GOOS == "darwin" {
508
- if ! (e .ppid == 1 && e .macAppArg == "" ) {
509
- return
510
- }
511
- }
512
- if runtime .GOOS == "linux" {
513
- if e .ppid != 1 {
514
- return
515
- }
504
+ if os .Getenv ("TERM" ) != "" {
505
+ return
516
506
}
517
507
518
508
path := core .QCoreApplication_ApplicationDirPath ()
@@ -655,7 +645,7 @@ func (e *Editor) connectAppSignals() {
655
645
switch event .Type () {
656
646
case core .QEvent__FileOpen :
657
647
// If goneovim not launched on finder (it is started in terminal)
658
- if e . ppid != 1 {
648
+ if os . Getenv ( "TERM" ) != "" {
659
649
return false
660
650
}
661
651
fileOpenEvent := gui .NewQFileOpenEventFromPointer (event .Pointer ())
0 commit comments