{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/14838","repository_url":"https://api.github.com/repos/Microsoft/vscode","labels_url":"https://api.github.com/repos/Microsoft/vscode/issues/14838/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/vscode/issues/14838/comments","events_url":"https://api.github.com/repos/Microsoft/vscode/issues/14838/events","html_url":"https://github.com/Microsoft/vscode/pull/14838","id":186727249,"number":14838,"title":"Provide an option to insert a final newline (fixes #1666)","user":{"login":"bpasero","id":900690,"avatar_url":"https://avatars.githubusercontent.com/u/900690?v=3","gravatar_id":"","url":"https://api.github.com/users/bpasero","html_url":"https://github.com/bpasero","followers_url":"https://api.github.com/users/bpasero/followers","following_url":"https://api.github.com/users/bpasero/following{/other_user}","gists_url":"https://api.github.com/users/bpasero/gists{/gist_id}","starred_url":"https://api.github.com/users/bpasero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpasero/subscriptions","organizations_url":"https://api.github.com/users/bpasero/orgs","repos_url":"https://api.github.com/users/bpasero/repos","events_url":"https://api.github.com/users/bpasero/events{/privacy}","received_events_url":"https://api.github.com/users/bpasero/received_events","type":"User","site_admin":false},"labels":[{"id":287229831,"url":"https://api.github.com/repos/Microsoft/vscode/labels/cla-not-required","name":"cla-not-required","color":"009800","default":false},{"id":272689392,"url":"https://api.github.com/repos/Microsoft/vscode/labels/feature-request","name":"feature-request","color":"bfe5bf","default":false}],"state":"open","locked":false,"assignee":{"login":"jrieken","id":1794099,"avatar_url":"https://avatars.githubusercontent.com/u/1794099?v=3","gravatar_id":"","url":"https://api.github.com/users/jrieken","html_url":"https://github.com/jrieken","followers_url":"https://api.github.com/users/jrieken/followers","following_url":"https://api.github.com/users/jrieken/following{/other_user}","gists_url":"https://api.github.com/users/jrieken/gists{/gist_id}","starred_url":"https://api.github.com/users/jrieken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrieken/subscriptions","organizations_url":"https://api.github.com/users/jrieken/orgs","repos_url":"https://api.github.com/users/jrieken/repos","events_url":"https://api.github.com/users/jrieken/events{/privacy}","received_events_url":"https://api.github.com/users/jrieken/received_events","type":"User","site_admin":false},"assignees":[{"login":"jrieken","id":1794099,"avatar_url":"https://avatars.githubusercontent.com/u/1794099?v=3","gravatar_id":"","url":"https://api.github.com/users/jrieken","html_url":"https://github.com/jrieken","followers_url":"https://api.github.com/users/jrieken/followers","following_url":"https://api.github.com/users/jrieken/following{/other_user}","gists_url":"https://api.github.com/users/jrieken/gists{/gist_id}","starred_url":"https://api.github.com/users/jrieken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrieken/subscriptions","organizations_url":"https://api.github.com/users/jrieken/orgs","repos_url":"https://api.github.com/users/jrieken/repos","events_url":"https://api.github.com/users/jrieken/events{/privacy}","received_events_url":"https://api.github.com/users/jrieken/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2016-11-02T07:07:11Z","updated_at":"2016-11-02T08:37:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/vscode/pulls/14838","html_url":"https://github.com/Microsoft/vscode/pull/14838","diff_url":"https://github.com/Microsoft/vscode/pull/14838.diff","patch_url":"https://github.com/Microsoft/vscode/pull/14838.patch"},"body":"My attempt to introduce a new save participant for adding a final new line at the end of the file unless:\r\n* the file does not contain more than one line\r\n* the last line is already whitespace\r\n\r\nThe only corner case I was not sure how to solve is that the cursor jumps to the last line when you save while you are on the last character of the previous line.\r\n\r\n/cc @alexandrudima "},"comment":{"url":"https://api.github.com/repos/Microsoft/vscode/issues/comments/257802851","html_url":"https://github.com/Microsoft/vscode/pull/14838#issuecomment-257802851","issue_url":"https://api.github.com/repos/Microsoft/vscode/issues/14838","id":257802851,"user":{"login":"bpasero","id":900690,"avatar_url":"https://avatars.githubusercontent.com/u/900690?v=3","gravatar_id":"","url":"https://api.github.com/users/bpasero","html_url":"https://github.com/bpasero","followers_url":"https://api.github.com/users/bpasero/followers","following_url":"https://api.github.com/users/bpasero/following{/other_user}","gists_url":"https://api.github.com/users/bpasero/gists{/gist_id}","starred_url":"https://api.github.com/users/bpasero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bpasero/subscriptions","organizations_url":"https://api.github.com/users/bpasero/orgs","repos_url":"https://api.github.com/users/bpasero/repos","events_url":"https://api.github.com/users/bpasero/events{/privacy}","received_events_url":"https://api.github.com/users/bpasero/received_events","type":"User","site_admin":false},"created_at":"2016-11-02T08:37:15Z","updated_at":"2016-11-02T08:37:15Z","body":"@jrieken I noticed that Sublime for example provides this out of the box, I think we should too. It goes well together with the trim trailing whitespace setting imho. \r\n\r\nThere is 11 votes on https://github.com/Microsoft/vscode/issues/1666 so I am not sure if people would expect this in the product or not."}}
{"actor":{"display_login":"bpasero"}}