{"action":"closed","issue":{"url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/47","repository_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode","labels_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/47/comments","events_url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/issues/47/events","html_url":"https://github.com/editorconfig/editorconfig-vscode/issues/47","id":148511143,"number":47,"title":"trim_trailing_whitespace moves caret","user":{"login":"theoy","id":8222470,"avatar_url":"https://avatars3.githubusercontent.com/u/8222470?v=4","gravatar_id":"","url":"https://api.github.com/users/theoy","html_url":"https://github.com/theoy","followers_url":"https://api.github.com/users/theoy/followers","following_url":"https://api.github.com/users/theoy/following{/other_user}","gists_url":"https://api.github.com/users/theoy/gists{/gist_id}","starred_url":"https://api.github.com/users/theoy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theoy/subscriptions","organizations_url":"https://api.github.com/users/theoy/orgs","repos_url":"https://api.github.com/users/theoy/repos","events_url":"https://api.github.com/users/theoy/events{/privacy}","received_events_url":"https://api.github.com/users/theoy/received_events","type":"User","site_admin":false},"labels":[{"id":322093182,"url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/labels/bug","name":"bug","color":"fc2929","default":true},{"id":322093185,"url":"https://api.github.com/repos/editorconfig/editorconfig-vscode/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":40,"created_at":"2016-04-14T23:28:57Z","updated_at":"2017-10-25T17:48:57Z","closed_at":"2017-10-25T17:48:57Z","author_association":"NONE","body":"_( ported from Microsoft/vscode-editorconfig#24 )_\n\nRepro'd on [editorconfig v0.2.7](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig):\n1. Enable autosave in VS Code (e.g. in user settings) - great for users who are used to using Git to back up their code.\n2. Open up a workspace that lacks VS Code workspace settings for `files.trimTrailingWhitespace`.\n3. In the same workspace, create a .editorconfig, setting `trim_trailing_whitespace = true`\n\nType some code with spaces, then rest (wait for autosave delay).\n\n**Expected**: Caret position remains, trailing whitespace preceding the caret is **not** trimmed\n**Actual**: All trailing whitespace is trimmed, causing the caret to move and the code (whitespace) that was under composition to be deleted.\n\nNote, this caused me to stop using `trim_trailing_whitespace` for a while, before I realised that enabling the matching VS Code option overrode the behaviour to be correct. However, figured it was worth reporting so that this could be improved for new users.\n"}}
{"actor":{"display_login":"jedmao"}}