GitHub PullRequestReviewCommentEvent at 2014-08-04 23:41:23
Repository: brackets
Actor: JeffryBooher
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/adobe/brackets/pulls/comments/15788386","id":15788386,"diff_hunk":"@@ -461,37 +511,32 @@ define(function (require, exports, module) {\n             var cursor = getSearchCursor(cm, state);\n             if (cm.getValue().length <= FIND_MAX_FILE_SIZE) {\n                 // FUTURE: if last query was prefix of this one, could optimize by filtering last result set\n-                var resultSet = [];\n+                state.resultSet = [];\n                 while (cursor.findNext()) {\n-                    resultSet.push(cursor.pos);  // pos is unique obj per search result\n+                    state.resultSet.push(cursor.pos);  // pos is unique obj per search result\n                 }\n                 \n                 // Highlight all matches if there aren't too many\n-                if (resultSet.length <= FIND_HIGHLIGHT_MAX) {\n+                if (state.resultSet.length <= FIND_HIGHLIGHT_MAX) {\n                     toggleHighlighting(editor, true);\n                     \n-                    resultSet.forEach(function (result) {\n+                    state.resultSet.forEach(function (result) {\n                         state.marked.push(cm.markText(result.from, result.to,\n                              { className: \"CodeMirror-searching\", startStyle: \"searching-first\", endStyle: \"searching-last\" }));\n                     });\n-                    var scrollTrackPositions = resultSet.map(function (result) {\n+                    var scrollTrackPositions = state.resultSet.map(function (result) {\n                         return result.from;\n                     });\n                     \n                     ScrollTrackMarkers.addTickmarks(editor, scrollTrackPositions);\n                 }\n                 \n-                var countInfo;\n-                if (resultSet.length === 0) {\n-                    countInfo = Strings.FIND_NO_RESULTS;\n-                } else if (resultSet.length === 1) {\n-                    countInfo = Strings.FIND_RESULT_COUNT_SINGLE;\n-                } else {\n-                    countInfo = StringUtils.format(Strings.FIND_RESULT_COUNT, resultSet.length);\n+                if (state.resultSet.length === 0) {\n+                    findBar.showFindCount(Strings.FIND_NO_RESULTS);\n                 }\n-                findBar.showFindCount(countInfo);\n-                state.foundAny = (resultSet.length > 0);\n-                indicateHasMatches(resultSet.length);\n+\n+                state.foundAny = (state.resultSet.length > 0);","path":"src/search/FindReplace.js","position":121,"original_position":121,"commit_id":"1cbd7d54e6b2eda22c2be2a57ea4455f57e04d1c","original_commit_id":"1cbd7d54e6b2eda22c2be2a57ea4455f57e04d1c","user":{"login":"JeffryBooher","id":1514099,"avatar_url":"https://avatars.githubusercontent.com/u/1514099?v=2","gravatar_id":"1234d6dd9b1c7675425047fc58d4f04c","url":"https://api.github.com/users/JeffryBooher","html_url":"https://github.com/JeffryBooher","followers_url":"https://api.github.com/users/JeffryBooher/followers","following_url":"https://api.github.com/users/JeffryBooher/following{/other_user}","gists_url":"https://api.github.com/users/JeffryBooher/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffryBooher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffryBooher/subscriptions","organizations_url":"https://api.github.com/users/JeffryBooher/orgs","repos_url":"https://api.github.com/users/JeffryBooher/repos","events_url":"https://api.github.com/users/JeffryBooher/events{/privacy}","received_events_url":"https://api.github.com/users/JeffryBooher/received_events","type":"User","site_admin":false},"body":"it looks like `foundAny` has other uses so disregard that","created_at":"2014-08-04T23:41:23Z","updated_at":"2014-08-04T23:41:23Z","html_url":"https://github.com/adobe/brackets/pull/8591#discussion_r15788386","pull_request_url":"https://api.github.com/repos/adobe/brackets/pulls/8591","_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/15788386"},"html":{"href":"https://github.com/adobe/brackets/pull/8591#discussion_r15788386"},"pull_request":{"href":"https://api.github.com/repos/adobe/brackets/pulls/8591"}}},"pull_request":{"url":"https://api.github.com/repos/adobe/brackets/pulls/8591","id":19039611,"html_url":"https://github.com/adobe/brackets/pull/8591","diff_url":"https://github.com/adobe/brackets/pull/8591.diff","patch_url":"https://github.com/adobe/brackets/pull/8591.patch","issue_url":"https://api.github.com/repos/adobe/brackets/issues/8591","number":8591,"state":"open","title":"Show match index in place of match count","user":{"login":"RaymondLim","id":1542488,"avatar_url":"https://avatars.githubusercontent.com/u/1542488?v=2","gravatar_id":"5e78f1f6398b643b4e5269d2ab5e24c6","url":"https://api.github.com/users/RaymondLim","html_url":"https://github.com/RaymondLim","followers_url":"https://api.github.com/users/RaymondLim/followers","following_url":"https://api.github.com/users/RaymondLim/following{/other_user}","gists_url":"https://api.github.com/users/RaymondLim/gists{/gist_id}","starred_url":"https://api.github.com/users/RaymondLim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaymondLim/subscriptions","organizations_url":"https://api.github.com/users/RaymondLim/orgs","repos_url":"https://api.github.com/users/RaymondLim/repos","events_url":"https://api.github.com/users/RaymondLim/events{/privacy}","received_events_url":"https://api.github.com/users/RaymondLim/received_events","type":"User","site_admin":false},"body":"This is the implementation of https://trello.com/c/0GXqt5GF/1089-s-find-next-indicate-current-match-index.","created_at":"2014-07-29T16:56:01Z","updated_at":"2014-08-04T23:41:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"69b3b36e1fcf6a3b3ca12e7c884595c3bec65e96","assignee":{"login":"JeffryBooher","id":1514099,"avatar_url":"https://avatars.githubusercontent.com/u/1514099?v=2","gravatar_id":"1234d6dd9b1c7675425047fc58d4f04c","url":"https://api.github.com/users/JeffryBooher","html_url":"https://github.com/JeffryBooher","followers_url":"https://api.github.com/users/JeffryBooher/followers","following_url":"https://api.github.com/users/JeffryBooher/following{/other_user}","gists_url":"https://api.github.com/users/JeffryBooher/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffryBooher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffryBooher/subscriptions","organizations_url":"https://api.github.com/users/JeffryBooher/orgs","repos_url":"https://api.github.com/users/JeffryBooher/repos","events_url":"https://api.github.com/users/JeffryBooher/events{/privacy}","received_events_url":"https://api.github.com/users/JeffryBooher/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/adobe/brackets/pulls/8591/commits","review_comments_url":"https://api.github.com/repos/adobe/brackets/pulls/8591/comments","review_comment_url":"https://api.github.com/repos/adobe/brackets/pulls/comments/{number}","comments_url":"https://api.github.com/repos/adobe/brackets/issues/8591/comments","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/1cbd7d54e6b2eda22c2be2a57ea4455f57e04d1c","head":{"label":"adobe:rlim/show-match-index","ref":"rlim/show-match-index","sha":"1cbd7d54e6b2eda22c2be2a57ea4455f57e04d1c","user":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"cc40327f6f93a7b75207a152962d8dbe","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":2935735,"name":"brackets","full_name":"adobe/brackets","owner":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"cc40327f6f93a7b75207a152962d8dbe","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":false,"url":"https://api.github.com/repos/adobe/brackets","forks_url":"https://api.github.com/repos/adobe/brackets/forks","keys_url":"https://api.github.com/repos/adobe/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/brackets/teams","hooks_url":"https://api.github.com/repos/adobe/brackets/hooks","issue_events_url":"https://api.github.com/repos/adobe/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/brackets/events","assignees_url":"https://api.github.com/repos/adobe/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/brackets/tags","blobs_url":"https://api.github.com/repos/adobe/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/brackets/languages","stargazers_url":"https://api.github.com/repos/adobe/brackets/stargazers","contributors_url":"https://api.github.com/repos/adobe/brackets/contributors","subscribers_url":"https://api.github.com/repos/adobe/brackets/subscribers","subscription_url":"https://api.github.com/repos/adobe/brackets/subscription","commits_url":"https://api.github.com/repos/adobe/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/brackets/issues/comments/{number}","contents_url":"https://api.github.com/repos/adobe/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/brackets/merges","archive_url":"https://api.github.com/repos/adobe/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/brackets/downloads","issues_url":"https://api.github.com/repos/adobe/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/brackets/labels{/name}","releases_url":"https://api.github.com/repos/adobe/brackets/releases{/id}","created_at":"2011-12-07T21:14:40Z","updated_at":"2014-08-04T22:50:34Z","pushed_at":"2014-08-04T23:39:32Z","git_url":"git://github.com/adobe/brackets.git","ssh_url":"git@github.com:adobe/brackets.git","clone_url":"https://github.com/adobe/brackets.git","svn_url":"https://github.com/adobe/brackets","homepage":"http://brackets.io","size":303171,"stargazers_count":17180,"watchers_count":17180,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3546,"mirror_url":null,"open_issues_count":926,"forks":3546,"open_issues":926,"watchers":17180,"default_branch":"master"}},"base":{"label":"adobe:master","ref":"master","sha":"8e181ce03b406c8393038d1ba12f7eb75bd331a4","user":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"cc40327f6f93a7b75207a152962d8dbe","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":2935735,"name":"brackets","full_name":"adobe/brackets","owner":{"login":"adobe","id":476009,"avatar_url":"https://avatars.githubusercontent.com/u/476009?v=2","gravatar_id":"cc40327f6f93a7b75207a152962d8dbe","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/brackets","description":"An open source code editor for the web, written in JavaScript, HTML and CSS.","fork":false,"url":"https://api.github.com/repos/adobe/brackets","forks_url":"https://api.github.com/repos/adobe/brackets/forks","keys_url":"https://api.github.com/repos/adobe/brackets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/brackets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/brackets/teams","hooks_url":"https://api.github.com/repos/adobe/brackets/hooks","issue_events_url":"https://api.github.com/repos/adobe/brackets/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/brackets/events","assignees_url":"https://api.github.com/repos/adobe/brackets/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/brackets/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/brackets/tags","blobs_url":"https://api.github.com/repos/adobe/brackets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/brackets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/brackets/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/brackets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/brackets/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/brackets/languages","stargazers_url":"https://api.github.com/repos/adobe/brackets/stargazers","contributors_url":"https://api.github.com/repos/adobe/brackets/contributors","subscribers_url":"https://api.github.com/repos/adobe/brackets/subscribers","subscription_url":"https://api.github.com/repos/adobe/brackets/subscription","commits_url":"https://api.github.com/repos/adobe/brackets/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/brackets/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/brackets/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/brackets/issues/comments/{number}","contents_url":"https://api.github.com/repos/adobe/brackets/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/brackets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/brackets/merges","archive_url":"https://api.github.com/repos/adobe/brackets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/brackets/downloads","issues_url":"https://api.github.com/repos/adobe/brackets/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/brackets/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/brackets/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/brackets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/brackets/labels{/name}","releases_url":"https://api.github.com/repos/adobe/brackets/releases{/id}","created_at":"2011-12-07T21:14:40Z","updated_at":"2014-08-04T22:50:34Z","pushed_at":"2014-08-04T23:39:32Z","git_url":"git://github.com/adobe/brackets.git","ssh_url":"git@github.com:adobe/brackets.git","clone_url":"https://github.com/adobe/brackets.git","svn_url":"https://github.com/adobe/brackets","homepage":"http://brackets.io","size":303171,"stargazers_count":17180,"watchers_count":17180,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"forks_count":3546,"mirror_url":null,"open_issues_count":926,"forks":3546,"open_issues":926,"watchers":17180,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adobe/brackets/pulls/8591"},"html":{"href":"https://github.com/adobe/brackets/pull/8591"},"issue":{"href":"https://api.github.com/repos/adobe/brackets/issues/8591"},"comments":{"href":"https://api.github.com/repos/adobe/brackets/issues/8591/comments"},"review_comments":{"href":"https://api.github.com/repos/adobe/brackets/pulls/8591/comments"},"review_comment":{"href":"https://api.github.com/repos/adobe/brackets/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/adobe/brackets/pulls/8591/commits"},"statuses":{"href":"https://api.github.com/repos/adobe/brackets/statuses/1cbd7d54e6b2eda22c2be2a57ea4455f57e04d1c"}}}}