{"action":"created","issue":{"url":"https://api.github.com/repos/mptre/yank/issues/22","labels_url":"https://api.github.com/repos/mptre/yank/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/mptre/yank/issues/22/comments","events_url":"https://api.github.com/repos/mptre/yank/issues/22/events","html_url":"https://github.com/mptre/yank/issues/22","id":119658799,"number":22,"title":"Saving and restoring cursor position does not work on OS X Terminal","user":{"login":"elyscape","id":792695,"avatar_url":"https://avatars.githubusercontent.com/u/792695?v=3","gravatar_id":"","url":"https://api.github.com/users/elyscape","html_url":"https://github.com/elyscape","followers_url":"https://api.github.com/users/elyscape/followers","following_url":"https://api.github.com/users/elyscape/following{/other_user}","gists_url":"https://api.github.com/users/elyscape/gists{/gist_id}","starred_url":"https://api.github.com/users/elyscape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyscape/subscriptions","organizations_url":"https://api.github.com/users/elyscape/orgs","repos_url":"https://api.github.com/users/elyscape/repos","events_url":"https://api.github.com/users/elyscape/events{/privacy}","received_events_url":"https://api.github.com/users/elyscape/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-12-01T07:24:34Z","updated_at":"2015-12-02T22:24:12Z","closed_at":null,"body":"On Terminal.app in OS X (and potentially elsewhere), the escape sequences to save and restore cursor position differ from [those used](https://github.com/mptre/yank/blob/master/yank.c#L29-L30). Specifically, `T_RESTORE_CURSOR` is `\"\\0338\"` and `T_SAVE_CURSOR` is `\"\\0337\"`. This is potentially different on other terminals, too."},"comment":{"url":"https://api.github.com/repos/mptre/yank/issues/comments/161453155","html_url":"https://github.com/mptre/yank/issues/22#issuecomment-161453155","issue_url":"https://api.github.com/repos/mptre/yank/issues/22","id":161453155,"user":{"login":"elyscape","id":792695,"avatar_url":"https://avatars.githubusercontent.com/u/792695?v=3","gravatar_id":"","url":"https://api.github.com/users/elyscape","html_url":"https://github.com/elyscape","followers_url":"https://api.github.com/users/elyscape/followers","following_url":"https://api.github.com/users/elyscape/following{/other_user}","gists_url":"https://api.github.com/users/elyscape/gists{/gist_id}","starred_url":"https://api.github.com/users/elyscape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elyscape/subscriptions","organizations_url":"https://api.github.com/users/elyscape/orgs","repos_url":"https://api.github.com/users/elyscape/repos","events_url":"https://api.github.com/users/elyscape/events{/privacy}","received_events_url":"https://api.github.com/users/elyscape/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T22:24:12Z","updated_at":"2015-12-02T22:24:12Z","body":"> The change would only require a rewrite of the `tputs` function (not tested):\r\n\r\nThe only potential issue with this is that `tputs` is currently also used [on this line](https://github.com/mptre/yank/blob/v0.5.0/yank.c#L390) to write a newline. That could be changed to use `twrite`, though."}}