{"action":"created","issue":{"url":"https://api.github.com/repos/atom/atom/issues/8454","labels_url":"https://api.github.com/repos/atom/atom/issues/8454/labels{/name}","comments_url":"https://api.github.com/repos/atom/atom/issues/8454/comments","events_url":"https://api.github.com/repos/atom/atom/issues/8454/events","html_url":"https://github.com/atom/atom/issues/8454","id":102094179,"number":8454,"title":"TextEditor.getCursorBufferPosition and tabs","user":{"login":"torgeirsh","id":5411177,"avatar_url":"https://avatars.githubusercontent.com/u/5411177?v=3","gravatar_id":"","url":"https://api.github.com/users/torgeirsh","html_url":"https://github.com/torgeirsh","followers_url":"https://api.github.com/users/torgeirsh/followers","following_url":"https://api.github.com/users/torgeirsh/following{/other_user}","gists_url":"https://api.github.com/users/torgeirsh/gists{/gist_id}","starred_url":"https://api.github.com/users/torgeirsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torgeirsh/subscriptions","organizations_url":"https://api.github.com/users/torgeirsh/orgs","repos_url":"https://api.github.com/users/torgeirsh/repos","events_url":"https://api.github.com/users/torgeirsh/events{/privacy}","received_events_url":"https://api.github.com/users/torgeirsh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/atom/atom/labels/question","name":"question","color":"EDEDED"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-08-20T08:55:07Z","updated_at":"2015-08-26T07:40:30Z","closed_at":"2015-08-21T16:40:51Z","body":"For the horizontal position returned by getCursorBufferPosition, a tab counts as 1 step insted of 8 (or other tab width). This is also apparent from the status bar. The behaviour differs from other popular editors like Visual Studio or IntelliJ IDEA, and causes trouble when plugins use the position to e.g. jump to the definition of the function name below the cursor. See this issue for reference: https://github.com/atom-haskell/ide-haskell/issues/92"},"comment":{"url":"https://api.github.com/repos/atom/atom/issues/comments/134880348","html_url":"https://github.com/atom/atom/issues/8454#issuecomment-134880348","issue_url":"https://api.github.com/repos/atom/atom/issues/8454","id":134880348,"user":{"login":"lierdakil","id":7275622,"avatar_url":"https://avatars.githubusercontent.com/u/7275622?v=3","gravatar_id":"","url":"https://api.github.com/users/lierdakil","html_url":"https://github.com/lierdakil","followers_url":"https://api.github.com/users/lierdakil/followers","following_url":"https://api.github.com/users/lierdakil/following{/other_user}","gists_url":"https://api.github.com/users/lierdakil/gists{/gist_id}","starred_url":"https://api.github.com/users/lierdakil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lierdakil/subscriptions","organizations_url":"https://api.github.com/users/lierdakil/orgs","repos_url":"https://api.github.com/users/lierdakil/repos","events_url":"https://api.github.com/users/lierdakil/events{/privacy}","received_events_url":"https://api.github.com/users/lierdakil/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T07:40:30Z","updated_at":"2015-08-26T07:40:30Z","body":"For what it's worth, general advice for Haskell is \"don't use tabs if you can help it\", precisely for this reason: tabs are unreliable in many cases.\r\n\r\nThat said, being able to transform a point and/or range for a given buffer/editor to/from tab-aware coordinates, while ignoring folds etc, would be a godsend. Best solution I could come up with at the moment is iterating over line containing a point, comparing computed and point column at each iteration, which is... less than elegant. Any advice is appreciated."}}