We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a38d9a commit 6b91cdeCopy full SHA for 6b91cde
editor/editor.go
@@ -610,7 +610,10 @@ func (e *Editor) connectAppSignals() {
610
611
if runtime.GOOS == "darwin" {
612
613
- e.openingFileCh = make(chan string, 2)
+ if e.openingFileCh == nil {
614
+ e.openingFileCh = make(chan string, 2)
615
+ }
616
+
617
go func() {
618
for {
619
openingFile := <-e.openingFileCh
editor/editor_darwin.go
@@ -13,6 +13,10 @@ import "unsafe"
13
func GetOpeningFilepath(str *C.char) {
14
goStr := C.GoString(str)
15
C.free(unsafe.Pointer(str))
16
17
+ if editor.openingFileCh == nil {
18
+ editor.openingFileCh = make(chan string, 2)
19
20
editor.openingFileCh <- goStr
21
}
22
0 commit comments