{"action":"opened","number":2,"pull_request":{"url":"https://api.github.com/repos/troglobit/editline/pulls/2","id":32640812,"html_url":"https://github.com/troglobit/editline/pull/2","diff_url":"https://github.com/troglobit/editline/pull/2.diff","patch_url":"https://github.com/troglobit/editline/pull/2.patch","issue_url":"https://api.github.com/repos/troglobit/editline/issues/2","number":2,"state":"open","locked":false,"title":"allow Ctrl-D to return eof","user":{"login":"TobyGoodwin","id":1092905,"avatar_url":"https://avatars.githubusercontent.com/u/1092905?v=3","gravatar_id":"","url":"https://api.github.com/users/TobyGoodwin","html_url":"https://github.com/TobyGoodwin","followers_url":"https://api.github.com/users/TobyGoodwin/followers","following_url":"https://api.github.com/users/TobyGoodwin/following{/other_user}","gists_url":"https://api.github.com/users/TobyGoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/TobyGoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TobyGoodwin/subscriptions","organizations_url":"https://api.github.com/users/TobyGoodwin/orgs","repos_url":"https://api.github.com/users/TobyGoodwin/repos","events_url":"https://api.github.com/users/TobyGoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/TobyGoodwin/received_events","type":"User","site_admin":false},"body":"Thanks for your work on editline: it's good to see this library still maintained.\r\n\r\nI'm puzzled as to what's going on in `tty_special`.\r\n\r\n    if (is_ctl_map_key(c))\r\n       return CSdispatch;\r\n\r\n    if (c == rl_eof && rl_point == 0 && rl_end == 0)\r\n        return CSeof;\r\n\r\n    return CSdispatch;\r\n\r\nThe second test here is for the terminal's eof character at the start of a line. But this test comes *after* the `is_ctl_map_key` test. Which means that if my eof character is a control character (which it is, being `Ctrl-D`) I cannot type it. (Instead editline just beeps at me, since there's no character to delete.)\r\n\r\nIt seems to me that the two tests should be swapped... which then means that the `is_ctl_map_key` test is redundant, since we will always return `CSdispatch` if we reach this point. And since this is the only place that `is_ctl_map_key` is called, that can go too.\r\n\r\nAny thoughts?","created_at":"2015-04-04T22:41:14Z","updated_at":"2015-04-04T22:41:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"413052319c7cbde5b5718052a3b1982b674d2a22","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/troglobit/editline/pulls/2/commits","review_comments_url":"https://api.github.com/repos/troglobit/editline/pulls/2/comments","review_comment_url":"https://api.github.com/repos/troglobit/editline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/troglobit/editline/issues/2/comments","statuses_url":"https://api.github.com/repos/troglobit/editline/statuses/3e597479757ba40dc5e823e3a6550dcb82ec7e09","head":{"label":"TobyGoodwin:master","ref":"master","sha":"3e597479757ba40dc5e823e3a6550dcb82ec7e09","user":{"login":"TobyGoodwin","id":1092905,"avatar_url":"https://avatars.githubusercontent.com/u/1092905?v=3","gravatar_id":"","url":"https://api.github.com/users/TobyGoodwin","html_url":"https://github.com/TobyGoodwin","followers_url":"https://api.github.com/users/TobyGoodwin/followers","following_url":"https://api.github.com/users/TobyGoodwin/following{/other_user}","gists_url":"https://api.github.com/users/TobyGoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/TobyGoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TobyGoodwin/subscriptions","organizations_url":"https://api.github.com/users/TobyGoodwin/orgs","repos_url":"https://api.github.com/users/TobyGoodwin/repos","events_url":"https://api.github.com/users/TobyGoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/TobyGoodwin/received_events","type":"User","site_admin":false},"repo":{"id":33422414,"name":"editline","full_name":"TobyGoodwin/editline","owner":{"login":"TobyGoodwin","id":1092905,"avatar_url":"https://avatars.githubusercontent.com/u/1092905?v=3","gravatar_id":"","url":"https://api.github.com/users/TobyGoodwin","html_url":"https://github.com/TobyGoodwin","followers_url":"https://api.github.com/users/TobyGoodwin/followers","following_url":"https://api.github.com/users/TobyGoodwin/following{/other_user}","gists_url":"https://api.github.com/users/TobyGoodwin/gists{/gist_id}","starred_url":"https://api.github.com/users/TobyGoodwin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TobyGoodwin/subscriptions","organizations_url":"https://api.github.com/users/TobyGoodwin/orgs","repos_url":"https://api.github.com/users/TobyGoodwin/repos","events_url":"https://api.github.com/users/TobyGoodwin/events{/privacy}","received_events_url":"https://api.github.com/users/TobyGoodwin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TobyGoodwin/editline","description":"Minix editline: A free readline() for UNIX/Linux that works without ncurses!","fork":true,"url":"https://api.github.com/repos/TobyGoodwin/editline","forks_url":"https://api.github.com/repos/TobyGoodwin/editline/forks","keys_url":"https://api.github.com/repos/TobyGoodwin/editline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TobyGoodwin/editline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TobyGoodwin/editline/teams","hooks_url":"https://api.github.com/repos/TobyGoodwin/editline/hooks","issue_events_url":"https://api.github.com/repos/TobyGoodwin/editline/issues/events{/number}","events_url":"https://api.github.com/repos/TobyGoodwin/editline/events","assignees_url":"https://api.github.com/repos/TobyGoodwin/editline/assignees{/user}","branches_url":"https://api.github.com/repos/TobyGoodwin/editline/branches{/branch}","tags_url":"https://api.github.com/repos/TobyGoodwin/editline/tags","blobs_url":"https://api.github.com/repos/TobyGoodwin/editline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TobyGoodwin/editline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TobyGoodwin/editline/git/refs{/sha}","trees_url":"https://api.github.com/repos/TobyGoodwin/editline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TobyGoodwin/editline/statuses/{sha}","languages_url":"https://api.github.com/repos/TobyGoodwin/editline/languages","stargazers_url":"https://api.github.com/repos/TobyGoodwin/editline/stargazers","contributors_url":"https://api.github.com/repos/TobyGoodwin/editline/contributors","subscribers_url":"https://api.github.com/repos/TobyGoodwin/editline/subscribers","subscription_url":"https://api.github.com/repos/TobyGoodwin/editline/subscription","commits_url":"https://api.github.com/repos/TobyGoodwin/editline/commits{/sha}","git_commits_url":"https://api.github.com/repos/TobyGoodwin/editline/git/commits{/sha}","comments_url":"https://api.github.com/repos/TobyGoodwin/editline/comments{/number}","issue_comment_url":"https://api.github.com/repos/TobyGoodwin/editline/issues/comments{/number}","contents_url":"https://api.github.com/repos/TobyGoodwin/editline/contents/{+path}","compare_url":"https://api.github.com/repos/TobyGoodwin/editline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TobyGoodwin/editline/merges","archive_url":"https://api.github.com/repos/TobyGoodwin/editline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TobyGoodwin/editline/downloads","issues_url":"https://api.github.com/repos/TobyGoodwin/editline/issues{/number}","pulls_url":"https://api.github.com/repos/TobyGoodwin/editline/pulls{/number}","milestones_url":"https://api.github.com/repos/TobyGoodwin/editline/milestones{/number}","notifications_url":"https://api.github.com/repos/TobyGoodwin/editline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TobyGoodwin/editline/labels{/name}","releases_url":"https://api.github.com/repos/TobyGoodwin/editline/releases{/id}","created_at":"2015-04-04T22:23:47Z","updated_at":"2015-04-04T22:29:20Z","pushed_at":"2015-04-04T22:29:19Z","git_url":"git://github.com/TobyGoodwin/editline.git","ssh_url":"git@github.com:TobyGoodwin/editline.git","clone_url":"https://github.com/TobyGoodwin/editline.git","svn_url":"https://github.com/TobyGoodwin/editline","homepage":"http://troglobit.com/editline.html","size":1097,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"troglobit:master","ref":"master","sha":"256e6106c7f4c61e2fbb65d6141cc4e7c75d73e6","user":{"login":"troglobit","id":183517,"avatar_url":"https://avatars.githubusercontent.com/u/183517?v=3","gravatar_id":"","url":"https://api.github.com/users/troglobit","html_url":"https://github.com/troglobit","followers_url":"https://api.github.com/users/troglobit/followers","following_url":"https://api.github.com/users/troglobit/following{/other_user}","gists_url":"https://api.github.com/users/troglobit/gists{/gist_id}","starred_url":"https://api.github.com/users/troglobit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troglobit/subscriptions","organizations_url":"https://api.github.com/users/troglobit/orgs","repos_url":"https://api.github.com/users/troglobit/repos","events_url":"https://api.github.com/users/troglobit/events{/privacy}","received_events_url":"https://api.github.com/users/troglobit/received_events","type":"User","site_admin":false},"repo":{"id":797112,"name":"editline","full_name":"troglobit/editline","owner":{"login":"troglobit","id":183517,"avatar_url":"https://avatars.githubusercontent.com/u/183517?v=3","gravatar_id":"","url":"https://api.github.com/users/troglobit","html_url":"https://github.com/troglobit","followers_url":"https://api.github.com/users/troglobit/followers","following_url":"https://api.github.com/users/troglobit/following{/other_user}","gists_url":"https://api.github.com/users/troglobit/gists{/gist_id}","starred_url":"https://api.github.com/users/troglobit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/troglobit/subscriptions","organizations_url":"https://api.github.com/users/troglobit/orgs","repos_url":"https://api.github.com/users/troglobit/repos","events_url":"https://api.github.com/users/troglobit/events{/privacy}","received_events_url":"https://api.github.com/users/troglobit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/troglobit/editline","description":"Minix editline: A free readline() for UNIX/Linux that works without ncurses!","fork":false,"url":"https://api.github.com/repos/troglobit/editline","forks_url":"https://api.github.com/repos/troglobit/editline/forks","keys_url":"https://api.github.com/repos/troglobit/editline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/troglobit/editline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/troglobit/editline/teams","hooks_url":"https://api.github.com/repos/troglobit/editline/hooks","issue_events_url":"https://api.github.com/repos/troglobit/editline/issues/events{/number}","events_url":"https://api.github.com/repos/troglobit/editline/events","assignees_url":"https://api.github.com/repos/troglobit/editline/assignees{/user}","branches_url":"https://api.github.com/repos/troglobit/editline/branches{/branch}","tags_url":"https://api.github.com/repos/troglobit/editline/tags","blobs_url":"https://api.github.com/repos/troglobit/editline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/troglobit/editline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/troglobit/editline/git/refs{/sha}","trees_url":"https://api.github.com/repos/troglobit/editline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/troglobit/editline/statuses/{sha}","languages_url":"https://api.github.com/repos/troglobit/editline/languages","stargazers_url":"https://api.github.com/repos/troglobit/editline/stargazers","contributors_url":"https://api.github.com/repos/troglobit/editline/contributors","subscribers_url":"https://api.github.com/repos/troglobit/editline/subscribers","subscription_url":"https://api.github.com/repos/troglobit/editline/subscription","commits_url":"https://api.github.com/repos/troglobit/editline/commits{/sha}","git_commits_url":"https://api.github.com/repos/troglobit/editline/git/commits{/sha}","comments_url":"https://api.github.com/repos/troglobit/editline/comments{/number}","issue_comment_url":"https://api.github.com/repos/troglobit/editline/issues/comments{/number}","contents_url":"https://api.github.com/repos/troglobit/editline/contents/{+path}","compare_url":"https://api.github.com/repos/troglobit/editline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/troglobit/editline/merges","archive_url":"https://api.github.com/repos/troglobit/editline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/troglobit/editline/downloads","issues_url":"https://api.github.com/repos/troglobit/editline/issues{/number}","pulls_url":"https://api.github.com/repos/troglobit/editline/pulls{/number}","milestones_url":"https://api.github.com/repos/troglobit/editline/milestones{/number}","notifications_url":"https://api.github.com/repos/troglobit/editline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/troglobit/editline/labels{/name}","releases_url":"https://api.github.com/repos/troglobit/editline/releases{/id}","created_at":"2010-07-25T21:06:05Z","updated_at":"2015-03-21T20:14:40Z","pushed_at":"2015-04-04T22:41:15Z","git_url":"git://github.com/troglobit/editline.git","ssh_url":"git@github.com:troglobit/editline.git","clone_url":"https://github.com/troglobit/editline.git","svn_url":"https://github.com/troglobit/editline","homepage":"http://troglobit.com/editline.html","size":1204,"stargazers_count":14,"watchers_count":14,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":1,"forks":3,"open_issues":1,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/troglobit/editline/pulls/2"},"html":{"href":"https://github.com/troglobit/editline/pull/2"},"issue":{"href":"https://api.github.com/repos/troglobit/editline/issues/2"},"comments":{"href":"https://api.github.com/repos/troglobit/editline/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/troglobit/editline/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/troglobit/editline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/troglobit/editline/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/troglobit/editline/statuses/3e597479757ba40dc5e823e3a6550dcb82ec7e09"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":0,"deletions":11,"changed_files":1}}