mirror of
https://github.com/akiyosi/goneovim.git
synced 2025-08-04 18:14:34 +02:00
Fix an issue where initialization may not have been performed
This commit is contained in:
parent
1a38d9a6d4
commit
6b91cde43a
2 changed files with 8 additions and 1 deletions
|
@ -610,7 +610,10 @@ func (e *Editor) connectAppSignals() {
|
|||
|
||||
if runtime.GOOS == "darwin" {
|
||||
|
||||
e.openingFileCh = make(chan string, 2)
|
||||
if e.openingFileCh == nil {
|
||||
e.openingFileCh = make(chan string, 2)
|
||||
}
|
||||
|
||||
go func() {
|
||||
for {
|
||||
openingFile := <-e.openingFileCh
|
||||
|
|
|
@ -13,6 +13,10 @@ import "unsafe"
|
|||
func GetOpeningFilepath(str *C.char) {
|
||||
goStr := C.GoString(str)
|
||||
C.free(unsafe.Pointer(str))
|
||||
|
||||
if editor.openingFileCh == nil {
|
||||
editor.openingFileCh = make(chan string, 2)
|
||||
}
|
||||
editor.openingFileCh <- goStr
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue