{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/atom-editorconfig/issues/61","labels_url":"https://api.github.com/repos/sindresorhus/atom-editorconfig/issues/61/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/atom-editorconfig/issues/61/comments","events_url":"https://api.github.com/repos/sindresorhus/atom-editorconfig/issues/61/events","html_url":"https://github.com/sindresorhus/atom-editorconfig/pull/61","id":126093503,"number":61,"title":"Fixes EOL replace: Reverts #51, Fixes #56, Fixes #54, Fixes #50","user":{"login":"dbachko","id":9260214,"avatar_url":"https://avatars.githubusercontent.com/u/9260214?v=3","gravatar_id":"","url":"https://api.github.com/users/dbachko","html_url":"https://github.com/dbachko","followers_url":"https://api.github.com/users/dbachko/followers","following_url":"https://api.github.com/users/dbachko/following{/other_user}","gists_url":"https://api.github.com/users/dbachko/gists{/gist_id}","starred_url":"https://api.github.com/users/dbachko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dbachko/subscriptions","organizations_url":"https://api.github.com/users/dbachko/orgs","repos_url":"https://api.github.com/users/dbachko/repos","events_url":"https://api.github.com/users/dbachko/events{/privacy}","received_events_url":"https://api.github.com/users/dbachko/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-12T04:12:44Z","updated_at":"2016-01-12T13:47:59Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sindresorhus/atom-editorconfig/pulls/61","html_url":"https://github.com/sindresorhus/atom-editorconfig/pull/61","diff_url":"https://github.com/sindresorhus/atom-editorconfig/pull/61.diff","patch_url":"https://github.com/sindresorhus/atom-editorconfig/pull/61.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/sindresorhus/atom-editorconfig/issues/comments/170916418","html_url":"https://github.com/sindresorhus/atom-editorconfig/pull/61#issuecomment-170916418","issue_url":"https://api.github.com/repos/sindresorhus/atom-editorconfig/issues/61","id":170916418,"user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"created_at":"2016-01-12T13:47:59Z","updated_at":"2016-01-12T13:47:59Z","body":"> Because there is the official more efficient(22 times faster) implementation of what you want to implement by yourself. Why not use api?\r\n\r\nLooking at your screenshots, the measurement is with `backwardsScanInRange`, not what I'm proposing.\r\n\r\nI'm not against using the API. I'm against having duplicated code. I prefer to solve the issue once and be able to reuse it everywhere. Your solution also does not preserve scroll/cursor position AFAIK.\r\n\r\nIf `setTextInRange` is faster than `text.replace(/\\r?\\n/g, preferredLineEnding)` and passing it to `atom-set-text`, I would be happy to switch to it in `atom-set-text`."}}