Skip to content

Could you explain some lines of your code? #9

Closed Answered by willothy
nyngwang asked this question in Q&A
Discussion options

You must be logged in to vote

Totally! Block is a boolean that tells the guest instance whether to wait for the host to close the file before exiting. It is sent from host to guest as the return value of Core.edit_files(). If block is false, the guest exits immediately leaving the files open in the host Neovim instance. If it's true, the guest sleeps indefinitely until the host tells it to quit (call to rpcnotify() on core.lua:5), so that external programs such as Git can wait for a file to be written and closed, as is necessary for commits.

The chanclose() function is used to close the connection from the guest to the host. It's not strictly necessary in this case as the guest instance will exit and terminate the ser…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@willothy
Comment options

@nyngwang
Comment options

@willothy
Comment options

@nyngwang
Comment options

@willothy
Comment options

Answer selected by willothy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants