-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
:GoErrCheck overwrites my file if it finds syntax error #2661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
You should be able to reload the file; nothing is actually lost. |
Yes, I can get back by ctrol-o. But it loads a new file to take up my current window, isn't it weird? It can show error info on the bottom, but nothing should happen to my window, right? |
Yes, what you've reported is indeed a bug due to the handling of You can also execute |
What did you do? (required: The issue will be closed when not provided)
If the source file has a syntax error, :GoErrorCheck will rewrite my file(buffer) with a default template. I can only ctrl + o to get back to my original file.
What did you expect to happen?
nothing should happen to my file, except it display the corresponding error info on the bottom.
What happened instead?
my file is overwritten, everything is gone.
Configuration (MUST fill this out):
default
vim-go version:
latest
vimrc
you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):vimrc
Vim version (first three lines from
:version
):8.2
Go version (
go version
):go version go1.13.3 darwin/amd64
Go environment
go env
Output:gopls version
gopls version
Output:golang.org/x/tools/gopls 0.2.2 golang.org/x/tools/[email protected] h1:ujGisyytgY1VGcmd66wIJ9+wVAfmodXj6daHM43HRXk=The text was updated successfully, but these errors were encountered: