{"action":"created","comment":{"url":"https://api.github.com/repos/neovim/neovim/pulls/comments/119208483","pull_request_review_id":41067747,"id":119208483,"diff_hunk":"@@ -44,19 +44,17 @@\n #define OUTBUF_SIZE 0xffff\n \n #define TOO_MANY_EVENTS 1000000\n-#define STARTS_WITH(str, prefix) (!memcmp(str, prefix, sizeof(prefix) - 1))\n-#define TMUX_WRAP(seq) (is_tmux ? \"\\x1bPtmux;\\x1b\" seq \"\\x1b\\\\\" : seq)\n-\n-typedef enum TermType {\n-  kTermUnknown,\n-  kTermGnome,\n-  kTermiTerm,\n-  kTermKonsole,\n-  kTermRxvt,\n-  kTermDTTerm,\n-  kTermXTerm,\n-  kTermTeraTerm,\n-} TermType;\n+#define STARTS_WITH(str, prefix) (strlen(term) >= (sizeof(prefix) - 1) \\\n+    && 0 == memcmp((str), (prefix), sizeof(prefix) - 1))\n+#define TMUX_WRAP(is_tmux,seq) ((is_tmux) ? \"\\x1bPtmux;\\x1b\" seq \"\\x1b\\\\\" : seq)\n+#define LINUXRESETC \"\\x1b[?0c\"\n+\n+// Per the commentary in terminfo, only a minus sign is a true suffix\n+// separator.\n+#define TERMINAL_FAMILY(term, prefix) ((term) \\\n+    && strlen(term) >= (sizeof(prefix) - 1) \\\n+    && 0 == memcmp((term), (prefix), sizeof(prefix) - 1) \\\n+    && ('\\0' == (term)[sizeof(prefix) - 1] || '-' == (term)[sizeof(prefix) - 1]))","path":"src/nvim/tui/tui.c","position":27,"original_position":27,"commit_id":"a7eb7040fccb5f445ac2749b19f23d9569c18665","original_commit_id":"a7eb7040fccb5f445ac2749b19f23d9569c18665","user":{"login":"jdebp","id":24855211,"avatar_url":"https://avatars1.githubusercontent.com/u/24855211?v=3","gravatar_id":"","url":"https://api.github.com/users/jdebp","html_url":"https://github.com/jdebp","followers_url":"https://api.github.com/users/jdebp/followers","following_url":"https://api.github.com/users/jdebp/following{/other_user}","gists_url":"https://api.github.com/users/jdebp/gists{/gist_id}","starred_url":"https://api.github.com/users/jdebp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdebp/subscriptions","organizations_url":"https://api.github.com/users/jdebp/orgs","repos_url":"https://api.github.com/users/jdebp/repos","events_url":"https://api.github.com/users/jdebp/events{/privacy}","received_events_url":"https://api.github.com/users/jdebp/received_events","type":"User","site_admin":false},"body":"True.  Of course that requires common subexpression analysis into functions.  Not that we are particularly worried about optimizing it.  (-:","created_at":"2017-05-30T20:39:23Z","updated_at":"2017-05-30T20:39:23Z","html_url":"https://github.com/neovim/neovim/pull/6816#discussion_r119208483","pull_request_url":"https://api.github.com/repos/neovim/neovim/pulls/6816","_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments/119208483"},"html":{"href":"https://github.com/neovim/neovim/pull/6816#discussion_r119208483"},"pull_request":{"href":"https://api.github.com/repos/neovim/neovim/pulls/6816"}}},"pull_request":{"url":"https://api.github.com/repos/neovim/neovim/pulls/6816","id":122525759,"html_url":"https://github.com/neovim/neovim/pull/6816","diff_url":"https://github.com/neovim/neovim/pull/6816.diff","patch_url":"https://github.com/neovim/neovim/pull/6816.patch","issue_url":"https://api.github.com/repos/neovim/neovim/issues/6816","number":6816,"state":"open","locked":false,"title":"TUI cursor shape and terminal type recognition improvements","user":{"login":"jdebp","id":24855211,"avatar_url":"https://avatars1.githubusercontent.com/u/24855211?v=3","gravatar_id":"","url":"https://api.github.com/users/jdebp","html_url":"https://github.com/jdebp","followers_url":"https://api.github.com/users/jdebp/followers","following_url":"https://api.github.com/users/jdebp/following{/other_user}","gists_url":"https://api.github.com/users/jdebp/gists{/gist_id}","starred_url":"https://api.github.com/users/jdebp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdebp/subscriptions","organizations_url":"https://api.github.com/users/jdebp/orgs","repos_url":"https://api.github.com/users/jdebp/repos","events_url":"https://api.github.com/users/jdebp/events{/privacy}","received_events_url":"https://api.github.com/users/jdebp/received_events","type":"User","site_admin":false},"body":"This should address:\r\n* #6802 by fixing the bug where nvim believed the terminals that said that they were `xterm`\r\n* #6803 with some doco fixes\r\n* #6795 by refactoring `fix_terminfo()`\r\n* #6778 by making nvim work more like tmux, support `guicursor` on more terminal types, and fall back to DECSCUSR before idiosyncratic control sequences\r\n* #6096 and #5089 by showing in `:help term-dependent-settings` how to deal with `termguicolors`\r\n\r\nThis builds upon #6801 and perhaps looks bigger than it actually is.\r\n\r\nI do not know what the impact of this on #6798 is.  It might also improve #6779.","created_at":"2017-05-25T21:04:59Z","updated_at":"2017-05-30T20:39:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2b3a69f3ca2e47edc54a8e3bbee0fbf8b1f53184","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/neovim/neovim/pulls/6816/commits","review_comments_url":"https://api.github.com/repos/neovim/neovim/pulls/6816/comments","review_comment_url":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/6816/comments","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/a7eb7040fccb5f445ac2749b19f23d9569c18665","head":{"label":"jdebp:non-terminfo-tui","ref":"non-terminfo-tui","sha":"a7eb7040fccb5f445ac2749b19f23d9569c18665","user":{"login":"jdebp","id":24855211,"avatar_url":"https://avatars1.githubusercontent.com/u/24855211?v=3","gravatar_id":"","url":"https://api.github.com/users/jdebp","html_url":"https://github.com/jdebp","followers_url":"https://api.github.com/users/jdebp/followers","following_url":"https://api.github.com/users/jdebp/following{/other_user}","gists_url":"https://api.github.com/users/jdebp/gists{/gist_id}","starred_url":"https://api.github.com/users/jdebp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdebp/subscriptions","organizations_url":"https://api.github.com/users/jdebp/orgs","repos_url":"https://api.github.com/users/jdebp/repos","events_url":"https://api.github.com/users/jdebp/events{/privacy}","received_events_url":"https://api.github.com/users/jdebp/received_events","type":"User","site_admin":false},"repo":{"id":90148825,"name":"neovim","full_name":"jdebp/neovim","owner":{"login":"jdebp","id":24855211,"avatar_url":"https://avatars1.githubusercontent.com/u/24855211?v=3","gravatar_id":"","url":"https://api.github.com/users/jdebp","html_url":"https://github.com/jdebp","followers_url":"https://api.github.com/users/jdebp/followers","following_url":"https://api.github.com/users/jdebp/following{/other_user}","gists_url":"https://api.github.com/users/jdebp/gists{/gist_id}","starred_url":"https://api.github.com/users/jdebp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdebp/subscriptions","organizations_url":"https://api.github.com/users/jdebp/orgs","repos_url":"https://api.github.com/users/jdebp/repos","events_url":"https://api.github.com/users/jdebp/events{/privacy}","received_events_url":"https://api.github.com/users/jdebp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jdebp/neovim","description":"Vim-fork focused on extensibility and usability.","fork":true,"url":"https://api.github.com/repos/jdebp/neovim","forks_url":"https://api.github.com/repos/jdebp/neovim/forks","keys_url":"https://api.github.com/repos/jdebp/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jdebp/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jdebp/neovim/teams","hooks_url":"https://api.github.com/repos/jdebp/neovim/hooks","issue_events_url":"https://api.github.com/repos/jdebp/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/jdebp/neovim/events","assignees_url":"https://api.github.com/repos/jdebp/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/jdebp/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/jdebp/neovim/tags","blobs_url":"https://api.github.com/repos/jdebp/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jdebp/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jdebp/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/jdebp/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jdebp/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/jdebp/neovim/languages","stargazers_url":"https://api.github.com/repos/jdebp/neovim/stargazers","contributors_url":"https://api.github.com/repos/jdebp/neovim/contributors","subscribers_url":"https://api.github.com/repos/jdebp/neovim/subscribers","subscription_url":"https://api.github.com/repos/jdebp/neovim/subscription","commits_url":"https://api.github.com/repos/jdebp/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/jdebp/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/jdebp/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/jdebp/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/jdebp/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/jdebp/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jdebp/neovim/merges","archive_url":"https://api.github.com/repos/jdebp/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jdebp/neovim/downloads","issues_url":"https://api.github.com/repos/jdebp/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/jdebp/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/jdebp/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/jdebp/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jdebp/neovim/labels{/name}","releases_url":"https://api.github.com/repos/jdebp/neovim/releases{/id}","deployments_url":"https://api.github.com/repos/jdebp/neovim/deployments","created_at":"2017-05-03T12:54:00Z","updated_at":"2017-05-03T12:54:08Z","pushed_at":"2017-05-30T19:09:36Z","git_url":"git://github.com/jdebp/neovim.git","ssh_url":"git@github.com:jdebp/neovim.git","clone_url":"https://github.com/jdebp/neovim.git","svn_url":"https://github.com/jdebp/neovim","homepage":"https://salt.bountysource.com/teams/neovim","size":56160,"stargazers_count":0,"watchers_count":0,"language":"Vim script","has_issues":false,"has_projects":true,"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":"neovim:master","ref":"master","sha":"43f40b8e1acafa55e1c8df7c08c91a042f834f97","user":{"login":"neovim","id":6471485,"avatar_url":"https://avatars0.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"repo":{"id":16408992,"name":"neovim","full_name":"neovim/neovim","owner":{"login":"neovim","id":6471485,"avatar_url":"https://avatars0.githubusercontent.com/u/6471485?v=3","gravatar_id":"","url":"https://api.github.com/users/neovim","html_url":"https://github.com/neovim","followers_url":"https://api.github.com/users/neovim/followers","following_url":"https://api.github.com/users/neovim/following{/other_user}","gists_url":"https://api.github.com/users/neovim/gists{/gist_id}","starred_url":"https://api.github.com/users/neovim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neovim/subscriptions","organizations_url":"https://api.github.com/users/neovim/orgs","repos_url":"https://api.github.com/users/neovim/repos","events_url":"https://api.github.com/users/neovim/events{/privacy}","received_events_url":"https://api.github.com/users/neovim/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/neovim/neovim","description":"Vim-fork focused on extensibility and usability.","fork":false,"url":"https://api.github.com/repos/neovim/neovim","forks_url":"https://api.github.com/repos/neovim/neovim/forks","keys_url":"https://api.github.com/repos/neovim/neovim/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neovim/neovim/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neovim/neovim/teams","hooks_url":"https://api.github.com/repos/neovim/neovim/hooks","issue_events_url":"https://api.github.com/repos/neovim/neovim/issues/events{/number}","events_url":"https://api.github.com/repos/neovim/neovim/events","assignees_url":"https://api.github.com/repos/neovim/neovim/assignees{/user}","branches_url":"https://api.github.com/repos/neovim/neovim/branches{/branch}","tags_url":"https://api.github.com/repos/neovim/neovim/tags","blobs_url":"https://api.github.com/repos/neovim/neovim/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neovim/neovim/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neovim/neovim/git/refs{/sha}","trees_url":"https://api.github.com/repos/neovim/neovim/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neovim/neovim/statuses/{sha}","languages_url":"https://api.github.com/repos/neovim/neovim/languages","stargazers_url":"https://api.github.com/repos/neovim/neovim/stargazers","contributors_url":"https://api.github.com/repos/neovim/neovim/contributors","subscribers_url":"https://api.github.com/repos/neovim/neovim/subscribers","subscription_url":"https://api.github.com/repos/neovim/neovim/subscription","commits_url":"https://api.github.com/repos/neovim/neovim/commits{/sha}","git_commits_url":"https://api.github.com/repos/neovim/neovim/git/commits{/sha}","comments_url":"https://api.github.com/repos/neovim/neovim/comments{/number}","issue_comment_url":"https://api.github.com/repos/neovim/neovim/issues/comments{/number}","contents_url":"https://api.github.com/repos/neovim/neovim/contents/{+path}","compare_url":"https://api.github.com/repos/neovim/neovim/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neovim/neovim/merges","archive_url":"https://api.github.com/repos/neovim/neovim/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neovim/neovim/downloads","issues_url":"https://api.github.com/repos/neovim/neovim/issues{/number}","pulls_url":"https://api.github.com/repos/neovim/neovim/pulls{/number}","milestones_url":"https://api.github.com/repos/neovim/neovim/milestones{/number}","notifications_url":"https://api.github.com/repos/neovim/neovim/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neovim/neovim/labels{/name}","releases_url":"https://api.github.com/repos/neovim/neovim/releases{/id}","deployments_url":"https://api.github.com/repos/neovim/neovim/deployments","created_at":"2014-01-31T13:39:22Z","updated_at":"2017-05-30T18:22:18Z","pushed_at":"2017-05-30T20:14:51Z","git_url":"git://github.com/neovim/neovim.git","ssh_url":"git@github.com:neovim/neovim.git","clone_url":"https://github.com/neovim/neovim.git","svn_url":"https://github.com/neovim/neovim","homepage":"https://salt.bountysource.com/teams/neovim","size":56564,"stargazers_count":22975,"watchers_count":22975,"language":"Vim script","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1669,"mirror_url":null,"open_issues_count":832,"forks":1669,"open_issues":832,"watchers":22975,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/neovim/neovim/pulls/6816"},"html":{"href":"https://github.com/neovim/neovim/pull/6816"},"issue":{"href":"https://api.github.com/repos/neovim/neovim/issues/6816"},"comments":{"href":"https://api.github.com/repos/neovim/neovim/issues/6816/comments"},"review_comments":{"href":"https://api.github.com/repos/neovim/neovim/pulls/6816/comments"},"review_comment":{"href":"https://api.github.com/repos/neovim/neovim/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/neovim/neovim/pulls/6816/commits"},"statuses":{"href":"https://api.github.com/repos/neovim/neovim/statuses/a7eb7040fccb5f445ac2749b19f23d9569c18665"}}}}
{"actor":{"display_login":"jdebp"}}