{"action":"created","issue":{"url":"https://api.github.com/repos/golang/go/issues/31937","repository_url":"https://api.github.com/repos/golang/go","labels_url":"https://api.github.com/repos/golang/go/issues/31937/labels{/name}","comments_url":"https://api.github.com/repos/golang/go/issues/31937/comments","events_url":"https://api.github.com/repos/golang/go/issues/31937/events","html_url":"https://github.com/golang/go/issues/31937","id":442297679,"node_id":"MDU6SXNzdWU0NDIyOTc2Nzk=","number":31937,"title":"x/tools/gopls: formatting resets cursor after save with CRLF line endings","user":{"login":"deanveloper","id":3196327,"node_id":"MDQ6VXNlcjMxOTYzMjc=","avatar_url":"https://avatars2.githubusercontent.com/u/3196327?v=4","gravatar_id":"","url":"https://api.github.com/users/deanveloper","html_url":"https://github.com/deanveloper","followers_url":"https://api.github.com/users/deanveloper/followers","following_url":"https://api.github.com/users/deanveloper/following{/other_user}","gists_url":"https://api.github.com/users/deanveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/deanveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deanveloper/subscriptions","organizations_url":"https://api.github.com/users/deanveloper/orgs","repos_url":"https://api.github.com/users/deanveloper/repos","events_url":"https://api.github.com/users/deanveloper/events{/privacy}","received_events_url":"https://api.github.com/users/deanveloper/received_events","type":"User","site_admin":false},"labels":[{"id":373399998,"node_id":"MDU6TGFiZWwzNzMzOTk5OTg=","url":"https://api.github.com/repos/golang/go/labels/NeedsFix","name":"NeedsFix","color":"ededed","default":false},{"id":1270193002,"node_id":"MDU6TGFiZWwxMjcwMTkzMDAy","url":"https://api.github.com/repos/golang/go/labels/gopls","name":"gopls","color":"f4c8a6","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/golang/go/milestones/22","html_url":"https://github.com/golang/go/milestone/22","labels_url":"https://api.github.com/repos/golang/go/milestones/22/labels","id":1067491,"node_id":"MDk6TWlsZXN0b25lMTA2NzQ5MQ==","number":22,"title":"Unreleased","description":"Issues that do not affect released Go code and binaries.\r\n","creator":{"login":"rsc","id":104030,"node_id":"MDQ6VXNlcjEwNDAzMA==","avatar_url":"https://avatars1.githubusercontent.com/u/104030?v=4","gravatar_id":"","url":"https://api.github.com/users/rsc","html_url":"https://github.com/rsc","followers_url":"https://api.github.com/users/rsc/followers","following_url":"https://api.github.com/users/rsc/following{/other_user}","gists_url":"https://api.github.com/users/rsc/gists{/gist_id}","starred_url":"https://api.github.com/users/rsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rsc/subscriptions","organizations_url":"https://api.github.com/users/rsc/orgs","repos_url":"https://api.github.com/users/rsc/repos","events_url":"https://api.github.com/users/rsc/events{/privacy}","received_events_url":"https://api.github.com/users/rsc/received_events","type":"User","site_admin":false},"open_issues":1233,"closed_issues":2328,"state":"open","created_at":"2015-04-14T18:48:22Z","updated_at":"2019-07-10T12:43:41Z","due_on":"2099-12-31T08:00:00Z","closed_at":null},"comments":20,"created_at":"2019-05-09T15:29:45Z","updated_at":"2019-07-10T14:05:39Z","closed_at":null,"author_association":"NONE","body":"<!-- Please answer these questions before submitting your issue. Thanks! -->\r\n\r\n### What version of Go are you using (`go version`)?\r\n\r\n<pre>\r\n$ go version\r\ngo version go1.12.5 windows/amd64\r\n</pre>\r\n\r\n### Does this issue reproduce with the latest release?\r\n\r\nYes\r\n\r\n### What operating system and processor architecture are you using (`go env`)?\r\n\r\n<details><summary><code>go env</code> Output</summary><br><pre>\r\n$ go env\r\nset GOARCH=amd64\r\nset GOBIN=\r\nset GOCACHE=C:\\Users\\[redacted]\\AppData\\Local\\go-build\r\nset GOEXE=.exe\r\nset GOFLAGS=\r\nset GOHOSTARCH=amd64\r\nset GOHOSTOS=windows\r\nset GOOS=windows\r\nset GOPATH=C:\\Users\\[redacted]\\go\r\nset GOPROXY=\r\nset GORACE=\r\nset GOROOT=C:\\Go\r\nset GOTMPDIR=\r\nset GOTOOLDIR=C:\\Go\\pkg\\tool\\windows_amd64\r\nset GCCGO=gccgo\r\nset CC=gcc\r\nset CXX=g++\r\nset CGO_ENABLED=1\r\nset GOMOD=\r\nset CGO_CFLAGS=-g -O2\r\nset CGO_CPPFLAGS=\r\nset CGO_CXXFLAGS=-g -O2\r\nset CGO_FFLAGS=-g -O2\r\nset CGO_LDFLAGS=-g -O2\r\nset PKG_CONFIG=pkg-config\r\nset GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\\Users\\[redacted]\\AppData\\Local\\Temp\\go-build065388570=/tmp/go-build -gno-record-gcc-switches\r\n\r\n</pre></details>\r\n\r\n### What did you do?\r\n\r\n<!--\r\nIf possible, provide a recipe for reproducing the error.\r\nA complete runnable program is good.\r\nA link on play.golang.org is best.\r\n-->\r\n\r\nSaved a .go file\r\n\r\n### What did you expect to see?\r\n\r\nMy cursor should stay in the same place after formatting\r\n\r\n### What did you see instead?\r\n\r\nMy cursor is reset to the beginning of the file. I have tried toggling the `[go] > editor.codeActionsOnSave` and `go.lintOnSave` settings to false and it still occurs.\r\n\r\n<details><summary>VSCode Settings</summary>\r\n\r\nGo extension: 0.10.2\r\n\r\n<pre>\r\n{\r\n    \"git.autofetch\": true,\r\n    \"files.associations\": {\r\n        \"*.tmpl\": \"gotemplate\"\r\n    },\r\n    \"terminal.integrated.shell.windows\": \"C:\\\\Program Files\\\\Git\\\\bin\\\\bash.exe\",\r\n    \"go.useLanguageServer\": true,\r\n    \"go.languageServerExperimentalFeatures\": {\r\n            \"diagnostics\": true // for diagnostics as you type\r\n    },\r\n    \"[go]\": {\r\n        \"editor.snippetSuggestions\": \"none\",\r\n        \"editor.codeActionsOnSave\": {\r\n            \"source.organizeImports\": true\r\n        },\r\n    },\r\n    \"gopls\": {\r\n        \"usePlaceholders\": true, // add parameter placeholders when completing a function\r\n        \"enhancedHover\": true,   // experimental to improve quality of hover (will be on by default soon)\r\n    },\r\n    \"go.lintOnSave\": \"off\"\r\n}\r\n</pre>\r\n</details>"},"comment":{"url":"https://api.github.com/repos/golang/go/issues/comments/510075689","html_url":"https://github.com/golang/go/issues/31937#issuecomment-510075689","issue_url":"https://api.github.com/repos/golang/go/issues/31937","id":510075689,"node_id":"MDEyOklzc3VlQ29tbWVudDUxMDA3NTY4OQ==","user":{"login":"deanveloper","id":3196327,"node_id":"MDQ6VXNlcjMxOTYzMjc=","avatar_url":"https://avatars2.githubusercontent.com/u/3196327?v=4","gravatar_id":"","url":"https://api.github.com/users/deanveloper","html_url":"https://github.com/deanveloper","followers_url":"https://api.github.com/users/deanveloper/followers","following_url":"https://api.github.com/users/deanveloper/following{/other_user}","gists_url":"https://api.github.com/users/deanveloper/gists{/gist_id}","starred_url":"https://api.github.com/users/deanveloper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deanveloper/subscriptions","organizations_url":"https://api.github.com/users/deanveloper/orgs","repos_url":"https://api.github.com/users/deanveloper/repos","events_url":"https://api.github.com/users/deanveloper/events{/privacy}","received_events_url":"https://api.github.com/users/deanveloper/received_events","type":"User","site_admin":false},"created_at":"2019-07-10T14:05:39Z","updated_at":"2019-07-10T14:05:39Z","author_association":"NONE","body":"@tweakmy For now there seems to be no workaround to the line resetting other than disabling the language server"}}
{"actor":{"display_login":"deanveloper"}}