{"action":"created","comment":{"url":"https://api.github.com/repos/ajaxorg/ace/pulls/comments/193998240","pull_request_review_id":127087602,"id":193998240,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5Mzk5ODI0MA==","diff_hunk":"@@ -479,7 +479,7 @@ var FilteredList = function(array, filterText) {\n         var upper = needle.toUpperCase();\n         var lower = needle.toLowerCase();\n         loop: for (var i = 0, item; item = items[i]; i++) {\n-            var caption = item.value || item.caption || item.snippet;\n+            var caption = item.snippet || item.caption || item.value;","path":"lib/ace/autocomplete.js","position":5,"original_position":5,"commit_id":"7531cc13ecfe4c25ba7d1efffa7c998bf8177d87","original_commit_id":"7531cc13ecfe4c25ba7d1efffa7c998bf8177d87","user":{"login":"43081j","id":5677153,"node_id":"MDQ6VXNlcjU2NzcxNTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5677153?v=4","gravatar_id":"","url":"https://api.github.com/users/43081j","html_url":"https://github.com/43081j","followers_url":"https://api.github.com/users/43081j/followers","following_url":"https://api.github.com/users/43081j/following{/other_user}","gists_url":"https://api.github.com/users/43081j/gists{/gist_id}","starred_url":"https://api.github.com/users/43081j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/43081j/subscriptions","organizations_url":"https://api.github.com/users/43081j/orgs","repos_url":"https://api.github.com/users/43081j/repos","events_url":"https://api.github.com/users/43081j/events{/privacy}","received_events_url":"https://api.github.com/users/43081j/received_events","type":"User","site_admin":false},"body":"@nightwing im struggling to understand what you suggest we do from here actually. the snippets autocompleter checks `value || name`, so are you suggesting we just have `snippet || caption || value || name` here?\r\n\r\nor are you suggesting we change the snippets autocompletion code?","created_at":"2018-06-08T09:13:36Z","updated_at":"2018-06-08T09:13:37Z","html_url":"https://github.com/ajaxorg/ace/pull/3676#discussion_r193998240","pull_request_url":"https://api.github.com/repos/ajaxorg/ace/pulls/3676","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/comments/193998240"},"html":{"href":"https://github.com/ajaxorg/ace/pull/3676#discussion_r193998240"},"pull_request":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/3676"}},"in_reply_to_id":193540003},"pull_request":{"url":"https://api.github.com/repos/ajaxorg/ace/pulls/3676","id":191373179,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkxMzczMTc5","html_url":"https://github.com/ajaxorg/ace/pull/3676","diff_url":"https://github.com/ajaxorg/ace/pull/3676.diff","patch_url":"https://github.com/ajaxorg/ace/pull/3676.patch","issue_url":"https://api.github.com/repos/ajaxorg/ace/issues/3676","number":3676,"state":"open","locked":false,"title":"re-order caption/value selection","user":{"login":"43081j","id":5677153,"node_id":"MDQ6VXNlcjU2NzcxNTM=","avatar_url":"https://avatars1.githubusercontent.com/u/5677153?v=4","gravatar_id":"","url":"https://api.github.com/users/43081j","html_url":"https://github.com/43081j","followers_url":"https://api.github.com/users/43081j/followers","following_url":"https://api.github.com/users/43081j/following{/other_user}","gists_url":"https://api.github.com/users/43081j/gists{/gist_id}","starred_url":"https://api.github.com/users/43081j/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/43081j/subscriptions","organizations_url":"https://api.github.com/users/43081j/orgs","repos_url":"https://api.github.com/users/43081j/repos","events_url":"https://api.github.com/users/43081j/events{/privacy}","received_events_url":"https://api.github.com/users/43081j/received_events","type":"User","site_admin":false},"body":"We were using `value` over `caption` for matching user input.\r\n\r\nHowever, this meant that users were searching the value they weren't being shown (caption is displayed instead of value). So if the value contains more or less characters than the caption, the indices for where we highlight matching characters were offset incorrectly.\r\n\r\nI think this is because, further up in `setFilter` we have caption/value, whereas here we had value/caption.\r\n\r\nExample:\r\n* Input: `b`\r\n* Entry: `{ caption: \"foobar\", value: \"xfoobar\" }`\r\n* Result: \"foob**a**r\"\r\n\r\ncc @nightwing ","created_at":"2018-05-30T08:33:25Z","updated_at":"2018-06-08T09:13:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"def202f7ec27701e3db32a9a09eb3a1c7c563d58","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ajaxorg/ace/pulls/3676/commits","review_comments_url":"https://api.github.com/repos/ajaxorg/ace/pulls/3676/comments","review_comment_url":"https://api.github.com/repos/ajaxorg/ace/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ajaxorg/ace/issues/3676/comments","statuses_url":"https://api.github.com/repos/ajaxorg/ace/statuses/7531cc13ecfe4c25ba7d1efffa7c998bf8177d87","head":{"label":"crispthinking:caption-masks","ref":"caption-masks","sha":"7531cc13ecfe4c25ba7d1efffa7c998bf8177d87","user":{"login":"crispthinking","id":33958040,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzOTU4MDQw","avatar_url":"https://avatars3.githubusercontent.com/u/33958040?v=4","gravatar_id":"","url":"https://api.github.com/users/crispthinking","html_url":"https://github.com/crispthinking","followers_url":"https://api.github.com/users/crispthinking/followers","following_url":"https://api.github.com/users/crispthinking/following{/other_user}","gists_url":"https://api.github.com/users/crispthinking/gists{/gist_id}","starred_url":"https://api.github.com/users/crispthinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crispthinking/subscriptions","organizations_url":"https://api.github.com/users/crispthinking/orgs","repos_url":"https://api.github.com/users/crispthinking/repos","events_url":"https://api.github.com/users/crispthinking/events{/privacy}","received_events_url":"https://api.github.com/users/crispthinking/received_events","type":"Organization","site_admin":false},"repo":{"id":124117017,"node_id":"MDEwOlJlcG9zaXRvcnkxMjQxMTcwMTc=","name":"ace","full_name":"crispthinking/ace","owner":{"login":"crispthinking","id":33958040,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMzOTU4MDQw","avatar_url":"https://avatars3.githubusercontent.com/u/33958040?v=4","gravatar_id":"","url":"https://api.github.com/users/crispthinking","html_url":"https://github.com/crispthinking","followers_url":"https://api.github.com/users/crispthinking/followers","following_url":"https://api.github.com/users/crispthinking/following{/other_user}","gists_url":"https://api.github.com/users/crispthinking/gists{/gist_id}","starred_url":"https://api.github.com/users/crispthinking/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crispthinking/subscriptions","organizations_url":"https://api.github.com/users/crispthinking/orgs","repos_url":"https://api.github.com/users/crispthinking/repos","events_url":"https://api.github.com/users/crispthinking/events{/privacy}","received_events_url":"https://api.github.com/users/crispthinking/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/crispthinking/ace","description":"Ace (Ajax.org Cloud9 Editor)","fork":true,"url":"https://api.github.com/repos/crispthinking/ace","forks_url":"https://api.github.com/repos/crispthinking/ace/forks","keys_url":"https://api.github.com/repos/crispthinking/ace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crispthinking/ace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crispthinking/ace/teams","hooks_url":"https://api.github.com/repos/crispthinking/ace/hooks","issue_events_url":"https://api.github.com/repos/crispthinking/ace/issues/events{/number}","events_url":"https://api.github.com/repos/crispthinking/ace/events","assignees_url":"https://api.github.com/repos/crispthinking/ace/assignees{/user}","branches_url":"https://api.github.com/repos/crispthinking/ace/branches{/branch}","tags_url":"https://api.github.com/repos/crispthinking/ace/tags","blobs_url":"https://api.github.com/repos/crispthinking/ace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crispthinking/ace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crispthinking/ace/git/refs{/sha}","trees_url":"https://api.github.com/repos/crispthinking/ace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crispthinking/ace/statuses/{sha}","languages_url":"https://api.github.com/repos/crispthinking/ace/languages","stargazers_url":"https://api.github.com/repos/crispthinking/ace/stargazers","contributors_url":"https://api.github.com/repos/crispthinking/ace/contributors","subscribers_url":"https://api.github.com/repos/crispthinking/ace/subscribers","subscription_url":"https://api.github.com/repos/crispthinking/ace/subscription","commits_url":"https://api.github.com/repos/crispthinking/ace/commits{/sha}","git_commits_url":"https://api.github.com/repos/crispthinking/ace/git/commits{/sha}","comments_url":"https://api.github.com/repos/crispthinking/ace/comments{/number}","issue_comment_url":"https://api.github.com/repos/crispthinking/ace/issues/comments{/number}","contents_url":"https://api.github.com/repos/crispthinking/ace/contents/{+path}","compare_url":"https://api.github.com/repos/crispthinking/ace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crispthinking/ace/merges","archive_url":"https://api.github.com/repos/crispthinking/ace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crispthinking/ace/downloads","issues_url":"https://api.github.com/repos/crispthinking/ace/issues{/number}","pulls_url":"https://api.github.com/repos/crispthinking/ace/pulls{/number}","milestones_url":"https://api.github.com/repos/crispthinking/ace/milestones{/number}","notifications_url":"https://api.github.com/repos/crispthinking/ace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crispthinking/ace/labels{/name}","releases_url":"https://api.github.com/repos/crispthinking/ace/releases{/id}","deployments_url":"https://api.github.com/repos/crispthinking/ace/deployments","created_at":"2018-03-06T17:55:03Z","updated_at":"2018-03-06T17:55:09Z","pushed_at":"2018-06-05T14:49:32Z","git_url":"git://github.com/crispthinking/ace.git","ssh_url":"git@github.com:crispthinking/ace.git","clone_url":"https://github.com/crispthinking/ace.git","svn_url":"https://github.com/crispthinking/ace","homepage":"https://ace.c9.io","size":36939,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ajaxorg:master","ref":"master","sha":"51c0625e138687257d0f943442d17056849086fb","user":{"login":"ajaxorg","id":168515,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODUxNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/168515?v=4","gravatar_id":"","url":"https://api.github.com/users/ajaxorg","html_url":"https://github.com/ajaxorg","followers_url":"https://api.github.com/users/ajaxorg/followers","following_url":"https://api.github.com/users/ajaxorg/following{/other_user}","gists_url":"https://api.github.com/users/ajaxorg/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaxorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaxorg/subscriptions","organizations_url":"https://api.github.com/users/ajaxorg/orgs","repos_url":"https://api.github.com/users/ajaxorg/repos","events_url":"https://api.github.com/users/ajaxorg/events{/privacy}","received_events_url":"https://api.github.com/users/ajaxorg/received_events","type":"Organization","site_admin":false},"repo":{"id":1028340,"node_id":"MDEwOlJlcG9zaXRvcnkxMDI4MzQw","name":"ace","full_name":"ajaxorg/ace","owner":{"login":"ajaxorg","id":168515,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE2ODUxNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/168515?v=4","gravatar_id":"","url":"https://api.github.com/users/ajaxorg","html_url":"https://github.com/ajaxorg","followers_url":"https://api.github.com/users/ajaxorg/followers","following_url":"https://api.github.com/users/ajaxorg/following{/other_user}","gists_url":"https://api.github.com/users/ajaxorg/gists{/gist_id}","starred_url":"https://api.github.com/users/ajaxorg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ajaxorg/subscriptions","organizations_url":"https://api.github.com/users/ajaxorg/orgs","repos_url":"https://api.github.com/users/ajaxorg/repos","events_url":"https://api.github.com/users/ajaxorg/events{/privacy}","received_events_url":"https://api.github.com/users/ajaxorg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ajaxorg/ace","description":"Ace (Ajax.org Cloud9 Editor)","fork":false,"url":"https://api.github.com/repos/ajaxorg/ace","forks_url":"https://api.github.com/repos/ajaxorg/ace/forks","keys_url":"https://api.github.com/repos/ajaxorg/ace/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ajaxorg/ace/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ajaxorg/ace/teams","hooks_url":"https://api.github.com/repos/ajaxorg/ace/hooks","issue_events_url":"https://api.github.com/repos/ajaxorg/ace/issues/events{/number}","events_url":"https://api.github.com/repos/ajaxorg/ace/events","assignees_url":"https://api.github.com/repos/ajaxorg/ace/assignees{/user}","branches_url":"https://api.github.com/repos/ajaxorg/ace/branches{/branch}","tags_url":"https://api.github.com/repos/ajaxorg/ace/tags","blobs_url":"https://api.github.com/repos/ajaxorg/ace/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ajaxorg/ace/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ajaxorg/ace/git/refs{/sha}","trees_url":"https://api.github.com/repos/ajaxorg/ace/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ajaxorg/ace/statuses/{sha}","languages_url":"https://api.github.com/repos/ajaxorg/ace/languages","stargazers_url":"https://api.github.com/repos/ajaxorg/ace/stargazers","contributors_url":"https://api.github.com/repos/ajaxorg/ace/contributors","subscribers_url":"https://api.github.com/repos/ajaxorg/ace/subscribers","subscription_url":"https://api.github.com/repos/ajaxorg/ace/subscription","commits_url":"https://api.github.com/repos/ajaxorg/ace/commits{/sha}","git_commits_url":"https://api.github.com/repos/ajaxorg/ace/git/commits{/sha}","comments_url":"https://api.github.com/repos/ajaxorg/ace/comments{/number}","issue_comment_url":"https://api.github.com/repos/ajaxorg/ace/issues/comments{/number}","contents_url":"https://api.github.com/repos/ajaxorg/ace/contents/{+path}","compare_url":"https://api.github.com/repos/ajaxorg/ace/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ajaxorg/ace/merges","archive_url":"https://api.github.com/repos/ajaxorg/ace/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ajaxorg/ace/downloads","issues_url":"https://api.github.com/repos/ajaxorg/ace/issues{/number}","pulls_url":"https://api.github.com/repos/ajaxorg/ace/pulls{/number}","milestones_url":"https://api.github.com/repos/ajaxorg/ace/milestones{/number}","notifications_url":"https://api.github.com/repos/ajaxorg/ace/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ajaxorg/ace/labels{/name}","releases_url":"https://api.github.com/repos/ajaxorg/ace/releases{/id}","deployments_url":"https://api.github.com/repos/ajaxorg/ace/deployments","created_at":"2010-10-27T10:43:36Z","updated_at":"2018-06-08T07:57:15Z","pushed_at":"2018-06-05T14:45:36Z","git_url":"git://github.com/ajaxorg/ace.git","ssh_url":"git@github.com:ajaxorg/ace.git","clone_url":"https://github.com/ajaxorg/ace.git","svn_url":"https://github.com/ajaxorg/ace","homepage":"https://ace.c9.io","size":37011,"stargazers_count":17584,"watchers_count":17584,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4002,"mirror_url":null,"archived":false,"open_issues_count":643,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":4002,"open_issues":643,"watchers":17584,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/3676"},"html":{"href":"https://github.com/ajaxorg/ace/pull/3676"},"issue":{"href":"https://api.github.com/repos/ajaxorg/ace/issues/3676"},"comments":{"href":"https://api.github.com/repos/ajaxorg/ace/issues/3676/comments"},"review_comments":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/3676/comments"},"review_comment":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ajaxorg/ace/pulls/3676/commits"},"statuses":{"href":"https://api.github.com/repos/ajaxorg/ace/statuses/7531cc13ecfe4c25ba7d1efffa7c998bf8177d87"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"43081j"}}