Open
Conversation
without a file, added CTRL+O to README
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potential fix for issue #137 with random chars from vim on mac, helpful failure for -c without a file, added CTRL+O to README
I saw the same error on a similar Mac. I experimented a bit and I don't think this is related to the gocui library. Seems to have something to do with .vimrc settings causing vim to spit out weird data into stdout after shutdown:
https://stackoverflow.com/questions/51129631/vim-8-1-garbage-printing-on-screen
Tough to ensure users have a good .vimrc, but one solution is to just not use the .vimrc if the editor is set to vim on a mac:
var cmd *exec.Cmd if editor == "vim" && runtime.GOOS == MAC_OS { cmd = exec.Command(editor, "-u", "NONE", file.Name()) } else { cmd = exec.Command(editor, file.Name()) }Not ideal but works. I also added a helpful failure message for running the -c flag and no file, rather than a seg fault.