{"action":"created","comment":{"url":"https://api.github.com/repos/codemirror/CodeMirror/pulls/comments/34584644","id":34584644,"diff_hunk":"@@ -132,7 +132,7 @@\n       if (!cursor.find(rev)) return;\n     }\n     cm.setSelection(cursor.from(), cursor.to());\n-    cm.scrollIntoView({from: cursor.from(), to: cursor.to()});\n+    cm.scrollIntoView({from: cursor.from(), to: cursor.to()}, 20);","path":"addon/search/search.js","position":5,"original_position":5,"commit_id":"7001496a02f50c81463701c5b5637ca4235508a9","original_commit_id":"7001496a02f50c81463701c5b5637ca4235508a9","user":{"login":"jeff-blaisdell","id":992868,"avatar_url":"https://avatars.githubusercontent.com/u/992868?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff-blaisdell","html_url":"https://github.com/jeff-blaisdell","followers_url":"https://api.github.com/users/jeff-blaisdell/followers","following_url":"https://api.github.com/users/jeff-blaisdell/following{/other_user}","gists_url":"https://api.github.com/users/jeff-blaisdell/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff-blaisdell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff-blaisdell/subscriptions","organizations_url":"https://api.github.com/users/jeff-blaisdell/orgs","repos_url":"https://api.github.com/users/jeff-blaisdell/repos","events_url":"https://api.github.com/users/jeff-blaisdell/events{/privacy}","received_events_url":"https://api.github.com/users/jeff-blaisdell/received_events","type":"User","site_admin":false},"body":"Without the margin, if a search term is on an early row i.e. Line 1 / 2, after the search cycles back up to the top from the bottom, the highlighted term is off the screen.  Here's a screenshot:\r\n\r\n<img width=\"658\" alt=\"screen shot 2015-07-14 at 10 40 33 am\" src=\"https://cloud.githubusercontent.com/assets/992868/8677816/de44a7a4-2a16-11e5-9a31-cdb1867964b7.png\">\r\n","created_at":"2015-07-14T15:58:33Z","updated_at":"2015-07-14T15:58:33Z","html_url":"https://github.com/codemirror/CodeMirror/pull/3389#discussion_r34584644","pull_request_url":"https://api.github.com/repos/codemirror/CodeMirror/pulls/3389","_links":{"self":{"href":"https://api.github.com/repos/codemirror/CodeMirror/pulls/comments/34584644"},"html":{"href":"https://github.com/codemirror/CodeMirror/pull/3389#discussion_r34584644"},"pull_request":{"href":"https://api.github.com/repos/codemirror/CodeMirror/pulls/3389"}}},"pull_request":{"url":"https://api.github.com/repos/codemirror/CodeMirror/pulls/3389","id":39929057,"html_url":"https://github.com/codemirror/CodeMirror/pull/3389","diff_url":"https://github.com/codemirror/CodeMirror/pull/3389.diff","patch_url":"https://github.com/codemirror/CodeMirror/pull/3389.patch","issue_url":"https://api.github.com/repos/codemirror/CodeMirror/issues/3389","number":3389,"state":"open","locked":false,"title":"Issue 3337: A couple fixes for new persistent search feature.","user":{"login":"jeff-blaisdell","id":992868,"avatar_url":"https://avatars.githubusercontent.com/u/992868?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff-blaisdell","html_url":"https://github.com/jeff-blaisdell","followers_url":"https://api.github.com/users/jeff-blaisdell/followers","following_url":"https://api.github.com/users/jeff-blaisdell/following{/other_user}","gists_url":"https://api.github.com/users/jeff-blaisdell/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff-blaisdell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff-blaisdell/subscriptions","organizations_url":"https://api.github.com/users/jeff-blaisdell/orgs","repos_url":"https://api.github.com/users/jeff-blaisdell/repos","events_url":"https://api.github.com/users/jeff-blaisdell/events{/privacy}","received_events_url":"https://api.github.com/users/jeff-blaisdell/received_events","type":"User","site_admin":false},"body":"* Fix a javascript error when invoking persisting search multiple times.\r\n* Fix issue with search cursor not being visible on screen.","created_at":"2015-07-14T15:36:19Z","updated_at":"2015-07-14T15:58:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b8e58b0cd9e71a6970cd9f578b73525b37070d75","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/codemirror/CodeMirror/pulls/3389/commits","review_comments_url":"https://api.github.com/repos/codemirror/CodeMirror/pulls/3389/comments","review_comment_url":"https://api.github.com/repos/codemirror/CodeMirror/pulls/comments{/number}","comments_url":"https://api.github.com/repos/codemirror/CodeMirror/issues/3389/comments","statuses_url":"https://api.github.com/repos/codemirror/CodeMirror/statuses/7001496a02f50c81463701c5b5637ca4235508a9","head":{"label":"jeff-blaisdell:search-fix","ref":"search-fix","sha":"7001496a02f50c81463701c5b5637ca4235508a9","user":{"login":"jeff-blaisdell","id":992868,"avatar_url":"https://avatars.githubusercontent.com/u/992868?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff-blaisdell","html_url":"https://github.com/jeff-blaisdell","followers_url":"https://api.github.com/users/jeff-blaisdell/followers","following_url":"https://api.github.com/users/jeff-blaisdell/following{/other_user}","gists_url":"https://api.github.com/users/jeff-blaisdell/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff-blaisdell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff-blaisdell/subscriptions","organizations_url":"https://api.github.com/users/jeff-blaisdell/orgs","repos_url":"https://api.github.com/users/jeff-blaisdell/repos","events_url":"https://api.github.com/users/jeff-blaisdell/events{/privacy}","received_events_url":"https://api.github.com/users/jeff-blaisdell/received_events","type":"User","site_admin":false},"repo":{"id":37619894,"name":"CodeMirror","full_name":"jeff-blaisdell/CodeMirror","owner":{"login":"jeff-blaisdell","id":992868,"avatar_url":"https://avatars.githubusercontent.com/u/992868?v=3","gravatar_id":"","url":"https://api.github.com/users/jeff-blaisdell","html_url":"https://github.com/jeff-blaisdell","followers_url":"https://api.github.com/users/jeff-blaisdell/followers","following_url":"https://api.github.com/users/jeff-blaisdell/following{/other_user}","gists_url":"https://api.github.com/users/jeff-blaisdell/gists{/gist_id}","starred_url":"https://api.github.com/users/jeff-blaisdell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeff-blaisdell/subscriptions","organizations_url":"https://api.github.com/users/jeff-blaisdell/orgs","repos_url":"https://api.github.com/users/jeff-blaisdell/repos","events_url":"https://api.github.com/users/jeff-blaisdell/events{/privacy}","received_events_url":"https://api.github.com/users/jeff-blaisdell/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jeff-blaisdell/CodeMirror","description":"In-browser code editor","fork":true,"url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror","forks_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/forks","keys_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/teams","hooks_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/hooks","issue_events_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/issues/events{/number}","events_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/events","assignees_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/assignees{/user}","branches_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/branches{/branch}","tags_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/tags","blobs_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/git/refs{/sha}","trees_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/statuses/{sha}","languages_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/languages","stargazers_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/stargazers","contributors_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/contributors","subscribers_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/subscribers","subscription_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/subscription","commits_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/commits{/sha}","git_commits_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/git/commits{/sha}","comments_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/comments{/number}","issue_comment_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/issues/comments{/number}","contents_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/contents/{+path}","compare_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/merges","archive_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/downloads","issues_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/issues{/number}","pulls_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/pulls{/number}","milestones_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/milestones{/number}","notifications_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/labels{/name}","releases_url":"https://api.github.com/repos/jeff-blaisdell/CodeMirror/releases{/id}","created_at":"2015-06-17T20:45:01Z","updated_at":"2015-06-17T20:45:05Z","pushed_at":"2015-07-14T15:33:26Z","git_url":"git://github.com/jeff-blaisdell/CodeMirror.git","ssh_url":"git@github.com:jeff-blaisdell/CodeMirror.git","clone_url":"https://github.com/jeff-blaisdell/CodeMirror.git","svn_url":"https://github.com/jeff-blaisdell/CodeMirror","homepage":"http://codemirror.net/","size":14608,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"codemirror:master","ref":"master","sha":"0c2264b44b085630113dc499eccaca5b544e5d77","user":{"login":"codemirror","id":8876537,"avatar_url":"https://avatars.githubusercontent.com/u/8876537?v=3","gravatar_id":"","url":"https://api.github.com/users/codemirror","html_url":"https://github.com/codemirror","followers_url":"https://api.github.com/users/codemirror/followers","following_url":"https://api.github.com/users/codemirror/following{/other_user}","gists_url":"https://api.github.com/users/codemirror/gists{/gist_id}","starred_url":"https://api.github.com/users/codemirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemirror/subscriptions","organizations_url":"https://api.github.com/users/codemirror/orgs","repos_url":"https://api.github.com/users/codemirror/repos","events_url":"https://api.github.com/users/codemirror/events{/privacy}","received_events_url":"https://api.github.com/users/codemirror/received_events","type":"Organization","site_admin":false},"repo":{"id":1254497,"name":"CodeMirror","full_name":"codemirror/CodeMirror","owner":{"login":"codemirror","id":8876537,"avatar_url":"https://avatars.githubusercontent.com/u/8876537?v=3","gravatar_id":"","url":"https://api.github.com/users/codemirror","html_url":"https://github.com/codemirror","followers_url":"https://api.github.com/users/codemirror/followers","following_url":"https://api.github.com/users/codemirror/following{/other_user}","gists_url":"https://api.github.com/users/codemirror/gists{/gist_id}","starred_url":"https://api.github.com/users/codemirror/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codemirror/subscriptions","organizations_url":"https://api.github.com/users/codemirror/orgs","repos_url":"https://api.github.com/users/codemirror/repos","events_url":"https://api.github.com/users/codemirror/events{/privacy}","received_events_url":"https://api.github.com/users/codemirror/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/codemirror/CodeMirror","description":"In-browser code editor","fork":false,"url":"https://api.github.com/repos/codemirror/CodeMirror","forks_url":"https://api.github.com/repos/codemirror/CodeMirror/forks","keys_url":"https://api.github.com/repos/codemirror/CodeMirror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codemirror/CodeMirror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codemirror/CodeMirror/teams","hooks_url":"https://api.github.com/repos/codemirror/CodeMirror/hooks","issue_events_url":"https://api.github.com/repos/codemirror/CodeMirror/issues/events{/number}","events_url":"https://api.github.com/repos/codemirror/CodeMirror/events","assignees_url":"https://api.github.com/repos/codemirror/CodeMirror/assignees{/user}","branches_url":"https://api.github.com/repos/codemirror/CodeMirror/branches{/branch}","tags_url":"https://api.github.com/repos/codemirror/CodeMirror/tags","blobs_url":"https://api.github.com/repos/codemirror/CodeMirror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codemirror/CodeMirror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codemirror/CodeMirror/git/refs{/sha}","trees_url":"https://api.github.com/repos/codemirror/CodeMirror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codemirror/CodeMirror/statuses/{sha}","languages_url":"https://api.github.com/repos/codemirror/CodeMirror/languages","stargazers_url":"https://api.github.com/repos/codemirror/CodeMirror/stargazers","contributors_url":"https://api.github.com/repos/codemirror/CodeMirror/contributors","subscribers_url":"https://api.github.com/repos/codemirror/CodeMirror/subscribers","subscription_url":"https://api.github.com/repos/codemirror/CodeMirror/subscription","commits_url":"https://api.github.com/repos/codemirror/CodeMirror/commits{/sha}","git_commits_url":"https://api.github.com/repos/codemirror/CodeMirror/git/commits{/sha}","comments_url":"https://api.github.com/repos/codemirror/CodeMirror/comments{/number}","issue_comment_url":"https://api.github.com/repos/codemirror/CodeMirror/issues/comments{/number}","contents_url":"https://api.github.com/repos/codemirror/CodeMirror/contents/{+path}","compare_url":"https://api.github.com/repos/codemirror/CodeMirror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codemirror/CodeMirror/merges","archive_url":"https://api.github.com/repos/codemirror/CodeMirror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codemirror/CodeMirror/downloads","issues_url":"https://api.github.com/repos/codemirror/CodeMirror/issues{/number}","pulls_url":"https://api.github.com/repos/codemirror/CodeMirror/pulls{/number}","milestones_url":"https://api.github.com/repos/codemirror/CodeMirror/milestones{/number}","notifications_url":"https://api.github.com/repos/codemirror/CodeMirror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codemirror/CodeMirror/labels{/name}","releases_url":"https://api.github.com/repos/codemirror/CodeMirror/releases{/id}","created_at":"2011-01-14T13:44:03Z","updated_at":"2015-07-14T15:10:27Z","pushed_at":"2015-07-14T15:36:19Z","git_url":"git://github.com/codemirror/CodeMirror.git","ssh_url":"git@github.com:codemirror/CodeMirror.git","clone_url":"https://github.com/codemirror/CodeMirror.git","svn_url":"https://github.com/codemirror/CodeMirror","homepage":"http://codemirror.net/","size":33434,"stargazers_count":7113,"watchers_count":7113,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1831,"mirror_url":null,"open_issues_count":92,"forks":1831,"open_issues":92,"watchers":7113,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/codemirror/CodeMirror/pulls/3389"},"html":{"href":"https://github.com/codemirror/CodeMirror/pull/3389"},"issue":{"href":"https://api.github.com/repos/codemirror/CodeMirror/issues/3389"},"comments":{"href":"https://api.github.com/repos/codemirror/CodeMirror/issues/3389/comments"},"review_comments":{"href":"https://api.github.com/repos/codemirror/CodeMirror/pulls/3389/comments"},"review_comment":{"href":"https://api.github.com/repos/codemirror/CodeMirror/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/codemirror/CodeMirror/pulls/3389/commits"},"statuses":{"href":"https://api.github.com/repos/codemirror/CodeMirror/statuses/7001496a02f50c81463701c5b5637ca4235508a9"}}}}