{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom/issues/5567","labels_url":"https://api.github.com/repos/atom/atom/issues/5567/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/5567/comments","events_url":"https://api.github.com/repos/atom/atom/issues/5567/events","html_url":"https://github.com/atom/atom/pull/5567","id":57728244,"number":5567,"title":"Indent soft wrap","user":{"login":"as-cii","id":482957,"avatar_url":"https://avatars.githubusercontent.com/u/482957?v=3","gravatar_id":"","url":"https://api.github.com/users/as-cii","html_url":"https://github.com/as-cii","followers_url":"https://api.github.com/users/as-cii/followers","following_url":"https://api.github.com/users/as-cii/following{/other_user}","gists_url":"https://api.github.com/users/as-cii/gists{/gist_id}","starred_url":"https://api.github.com/users/as-cii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/as-cii/subscriptions","organizations_url":"https://api.github.com/users/as-cii/orgs","repos_url":"https://api.github.com/users/as-cii/repos","events_url":"https://api.github.com/users/as-cii/events{/privacy}","received_events_url":"https://api.github.com/users/as-cii/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":31,"created_at":"2015-02-15T12:07:48Z","updated_at":"2015-02-24T07:42:35Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/atom/atom/pulls/5567","html_url":"https://github.com/atom/atom/pull/5567","diff_url":"https://github.com/atom/atom/pull/5567.diff","patch_url":"https://github.com/atom/atom/pull/5567.patch"},"body":"This fixes #1125.\r\n\r\nIt still needs a lot of refactoring (and some test cases too), but I just wanted to evaluate the approach that me and @nathansobo agreed on the aforementioned issue. To recap, the following is a brief explanation of how the solution works.\r\n\r\nWhen lines with an indentation are soft wrapped, they are prepended with a phantom token which is as long as the indentation of the original line. This token is not selectable, nor reachable by the cursor. I had to change how `DisplayBuffer#clipScreenPosition` worked, since I could not treat the phantom token as an hard tab. I'd like to remark that this is still experimental code, but based on my tests I can confirm it works pretty well.\r\n\r\n~~There's a subtle bug, though, which needs to be addressed and which I'll be looking at soon after creating this pull request. When a line is indented but no space is present, Atom freezes: I am quite sure this is due to how soft wrapping works on lines without spaces (namely, lines without words). I am quite sure this can be fixed easily, it just needs some more attention (and a better knowledge of the codebase).~~\r\n\r\nThanks everyone in advance for the support!\r\n\r\n/cc: @atom/core"},"comment":{"url":"https://api.github.com/repos/atom/atom/issues/comments/75712313","html_url":"https://github.com/atom/atom/pull/5567#issuecomment-75712313","issue_url":"https://api.github.com/repos/atom/atom/issues/5567","id":75712313,"user":{"login":"as-cii","id":482957,"avatar_url":"https://avatars.githubusercontent.com/u/482957?v=3","gravatar_id":"","url":"https://api.github.com/users/as-cii","html_url":"https://github.com/as-cii","followers_url":"https://api.github.com/users/as-cii/followers","following_url":"https://api.github.com/users/as-cii/following{/other_user}","gists_url":"https://api.github.com/users/as-cii/gists{/gist_id}","starred_url":"https://api.github.com/users/as-cii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/as-cii/subscriptions","organizations_url":"https://api.github.com/users/as-cii/orgs","repos_url":"https://api.github.com/users/as-cii/repos","events_url":"https://api.github.com/users/as-cii/events{/privacy}","received_events_url":"https://api.github.com/users/as-cii/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T07:42:34Z","updated_at":"2015-02-24T07:42:34Z","body":"> Can you merge master into this so we can test it out **today**?\r\n\r\n@nathansobo I am sorry for answering a bit late to this, but it was already evening here in Italy :sleeping: \r\n\r\nI just merged master into this branch and pushed it already: now it should be ready for testing! :smile:"}}