{"action":"created","comment":{"url":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/comments/184875924","pull_request_review_id":116159547,"id":184875924,"diff_hunk":"@@ -222,6 +238,53 @@ def _getDigest(self, line, mode):\n         else:\n             return line.rsplit(\"\\t\", 1)[1][1:-1]\n \n+    def startExplorer(self, win_pos, *args, **kwargs):\n+        super(FunctionExplManager, self).startExplorer(win_pos, *args, **kwargs)\n+        if (not self._launched) or (len(args) > 0):\n+            return \n+        # a postfix bang sign, skip input() and locate cursor\n+        if kwargs.get('bang', False):\n+            self._relocateCursor()\n+\n+    def _pathEqual(self, p1, p2):\n+        p1 = os.path.normcase(os.path.abspath(p1))\n+        p2 = os.path.normcase(os.path.abspath(p2))\n+        return (p1 == p2)\n+\n+    def _relocateCursor(self):\n+        inst = self._getInstance()\n+        orig_name = inst.getOriginalPos()[2].name\n+        orig_line = inst.getOriginalCursor()[0]\n+        tags = []\n+        index = 0\n+        for line in inst.buffer:\n+            index += 1\n+            pos = line.rfind('\\t')\n+            if pos < 0:\n+                continue\n+            text = line[pos + 1:].strip()\n+            if text.startswith('[') and text.endswith(']'):\n+                pos = text.rfind(' ')\n+                if pos < 0:\n+                    continue\n+                text = text[1:pos].strip()\n+                pos = text.rfind(':')\n+                if pos < 0:\n+                    continue\n+                filename = text[:pos]\n+                ln = int(text[pos + 1:])","path":"autoload/leaderf/python/leaderf/functionExpl.py","position":72,"original_position":72,"commit_id":"30f88f5b81c3a43248c8d50346a9bfb8179c41fc","original_commit_id":"0d77b88a0bda9126eb05005aa74101dc15d5a4cd","user":{"login":"Yggdroot","id":2705841,"avatar_url":"https://avatars2.githubusercontent.com/u/2705841?v=4","gravatar_id":"","url":"https://api.github.com/users/Yggdroot","html_url":"https://github.com/Yggdroot","followers_url":"https://api.github.com/users/Yggdroot/followers","following_url":"https://api.github.com/users/Yggdroot/following{/other_user}","gists_url":"https://api.github.com/users/Yggdroot/gists{/gist_id}","starred_url":"https://api.github.com/users/Yggdroot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yggdroot/subscriptions","organizations_url":"https://api.github.com/users/Yggdroot/orgs","repos_url":"https://api.github.com/users/Yggdroot/repos","events_url":"https://api.github.com/users/Yggdroot/events{/privacy}","received_events_url":"https://api.github.com/users/Yggdroot/received_events","type":"User","site_admin":false},"body":"上面这些逻辑，可以用下面两行得到行号：\r\n```python\r\n line = line.rsplit(\"\\t\", 1)[1][1:-1]    # file:line buf_number\r\n line_nr = line.rsplit(\":\", 1)[1].split()[0]\r\n```\r\n因为格式是我定的，不存在异常情况。\r\n即：{kind}<tab>{code}<tab>[{file}:{line} {bufnr}]","created_at":"2018-04-29T08:50:26Z","updated_at":"2018-04-29T08:50:26Z","html_url":"https://github.com/Yggdroot/LeaderF/pull/143#discussion_r184875924","pull_request_url":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/143","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/comments/184875924"},"html":{"href":"https://github.com/Yggdroot/LeaderF/pull/143#discussion_r184875924"},"pull_request":{"href":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/143"}}},"pull_request":{"url":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/143","id":184798636,"html_url":"https://github.com/Yggdroot/LeaderF/pull/143","diff_url":"https://github.com/Yggdroot/LeaderF/pull/143.diff","patch_url":"https://github.com/Yggdroot/LeaderF/pull/143.patch","issue_url":"https://api.github.com/repos/Yggdroot/LeaderF/issues/143","number":143,"state":"open","locked":false,"title":"New function LeadfFunction! to enter normal mode directly","user":{"login":"skywind3000","id":3035071,"avatar_url":"https://avatars3.githubusercontent.com/u/3035071?v=4","gravatar_id":"","url":"https://api.github.com/users/skywind3000","html_url":"https://github.com/skywind3000","followers_url":"https://api.github.com/users/skywind3000/followers","following_url":"https://api.github.com/users/skywind3000/following{/other_user}","gists_url":"https://api.github.com/users/skywind3000/gists{/gist_id}","starred_url":"https://api.github.com/users/skywind3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skywind3000/subscriptions","organizations_url":"https://api.github.com/users/skywind3000/orgs","repos_url":"https://api.github.com/users/skywind3000/repos","events_url":"https://api.github.com/users/skywind3000/events{/privacy}","received_events_url":"https://api.github.com/users/skywind3000/received_events","type":"User","site_admin":false},"body":"1. Postfix a bang sign to LoadfFunction to enable entering normal mode directly\r\n2. Reposition cursor to the current function in the function normal mode","created_at":"2018-04-28T18:08:55Z","updated_at":"2018-04-29T08:50:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d698420237647cf3136cd63d86cdb456dcae685b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/143/commits","review_comments_url":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/143/comments","review_comment_url":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Yggdroot/LeaderF/issues/143/comments","statuses_url":"https://api.github.com/repos/Yggdroot/LeaderF/statuses/30f88f5b81c3a43248c8d50346a9bfb8179c41fc","head":{"label":"skywind3000:master","ref":"master","sha":"30f88f5b81c3a43248c8d50346a9bfb8179c41fc","user":{"login":"skywind3000","id":3035071,"avatar_url":"https://avatars3.githubusercontent.com/u/3035071?v=4","gravatar_id":"","url":"https://api.github.com/users/skywind3000","html_url":"https://github.com/skywind3000","followers_url":"https://api.github.com/users/skywind3000/followers","following_url":"https://api.github.com/users/skywind3000/following{/other_user}","gists_url":"https://api.github.com/users/skywind3000/gists{/gist_id}","starred_url":"https://api.github.com/users/skywind3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skywind3000/subscriptions","organizations_url":"https://api.github.com/users/skywind3000/orgs","repos_url":"https://api.github.com/users/skywind3000/repos","events_url":"https://api.github.com/users/skywind3000/events{/privacy}","received_events_url":"https://api.github.com/users/skywind3000/received_events","type":"User","site_admin":false},"repo":{"id":131326575,"name":"LeaderF","full_name":"skywind3000/LeaderF","owner":{"login":"skywind3000","id":3035071,"avatar_url":"https://avatars3.githubusercontent.com/u/3035071?v=4","gravatar_id":"","url":"https://api.github.com/users/skywind3000","html_url":"https://github.com/skywind3000","followers_url":"https://api.github.com/users/skywind3000/followers","following_url":"https://api.github.com/users/skywind3000/following{/other_user}","gists_url":"https://api.github.com/users/skywind3000/gists{/gist_id}","starred_url":"https://api.github.com/users/skywind3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/skywind3000/subscriptions","organizations_url":"https://api.github.com/users/skywind3000/orgs","repos_url":"https://api.github.com/users/skywind3000/repos","events_url":"https://api.github.com/users/skywind3000/events{/privacy}","received_events_url":"https://api.github.com/users/skywind3000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/skywind3000/LeaderF","description":"An asynchronous fuzzy finder which is used to quickly locate files, buffers, mrus, tags, etc. in large project.","fork":true,"url":"https://api.github.com/repos/skywind3000/LeaderF","forks_url":"https://api.github.com/repos/skywind3000/LeaderF/forks","keys_url":"https://api.github.com/repos/skywind3000/LeaderF/keys{/key_id}","collaborators_url":"https://api.github.com/repos/skywind3000/LeaderF/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/skywind3000/LeaderF/teams","hooks_url":"https://api.github.com/repos/skywind3000/LeaderF/hooks","issue_events_url":"https://api.github.com/repos/skywind3000/LeaderF/issues/events{/number}","events_url":"https://api.github.com/repos/skywind3000/LeaderF/events","assignees_url":"https://api.github.com/repos/skywind3000/LeaderF/assignees{/user}","branches_url":"https://api.github.com/repos/skywind3000/LeaderF/branches{/branch}","tags_url":"https://api.github.com/repos/skywind3000/LeaderF/tags","blobs_url":"https://api.github.com/repos/skywind3000/LeaderF/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/skywind3000/LeaderF/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/skywind3000/LeaderF/git/refs{/sha}","trees_url":"https://api.github.com/repos/skywind3000/LeaderF/git/trees{/sha}","statuses_url":"https://api.github.com/repos/skywind3000/LeaderF/statuses/{sha}","languages_url":"https://api.github.com/repos/skywind3000/LeaderF/languages","stargazers_url":"https://api.github.com/repos/skywind3000/LeaderF/stargazers","contributors_url":"https://api.github.com/repos/skywind3000/LeaderF/contributors","subscribers_url":"https://api.github.com/repos/skywind3000/LeaderF/subscribers","subscription_url":"https://api.github.com/repos/skywind3000/LeaderF/subscription","commits_url":"https://api.github.com/repos/skywind3000/LeaderF/commits{/sha}","git_commits_url":"https://api.github.com/repos/skywind3000/LeaderF/git/commits{/sha}","comments_url":"https://api.github.com/repos/skywind3000/LeaderF/comments{/number}","issue_comment_url":"https://api.github.com/repos/skywind3000/LeaderF/issues/comments{/number}","contents_url":"https://api.github.com/repos/skywind3000/LeaderF/contents/{+path}","compare_url":"https://api.github.com/repos/skywind3000/LeaderF/compare/{base}...{head}","merges_url":"https://api.github.com/repos/skywind3000/LeaderF/merges","archive_url":"https://api.github.com/repos/skywind3000/LeaderF/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/skywind3000/LeaderF/downloads","issues_url":"https://api.github.com/repos/skywind3000/LeaderF/issues{/number}","pulls_url":"https://api.github.com/repos/skywind3000/LeaderF/pulls{/number}","milestones_url":"https://api.github.com/repos/skywind3000/LeaderF/milestones{/number}","notifications_url":"https://api.github.com/repos/skywind3000/LeaderF/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/skywind3000/LeaderF/labels{/name}","releases_url":"https://api.github.com/repos/skywind3000/LeaderF/releases{/id}","deployments_url":"https://api.github.com/repos/skywind3000/LeaderF/deployments","created_at":"2018-04-27T17:32:47Z","updated_at":"2018-04-29T08:45:24Z","pushed_at":"2018-04-29T08:45:22Z","git_url":"git://github.com/skywind3000/LeaderF.git","ssh_url":"git@github.com:skywind3000/LeaderF.git","clone_url":"https://github.com/skywind3000/LeaderF.git","svn_url":"https://github.com/skywind3000/LeaderF","homepage":"","size":435,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Yggdroot:master","ref":"master","sha":"96c22807b7920be46d63e05f5a7b159030908ca7","user":{"login":"Yggdroot","id":2705841,"avatar_url":"https://avatars2.githubusercontent.com/u/2705841?v=4","gravatar_id":"","url":"https://api.github.com/users/Yggdroot","html_url":"https://github.com/Yggdroot","followers_url":"https://api.github.com/users/Yggdroot/followers","following_url":"https://api.github.com/users/Yggdroot/following{/other_user}","gists_url":"https://api.github.com/users/Yggdroot/gists{/gist_id}","starred_url":"https://api.github.com/users/Yggdroot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yggdroot/subscriptions","organizations_url":"https://api.github.com/users/Yggdroot/orgs","repos_url":"https://api.github.com/users/Yggdroot/repos","events_url":"https://api.github.com/users/Yggdroot/events{/privacy}","received_events_url":"https://api.github.com/users/Yggdroot/received_events","type":"User","site_admin":false},"repo":{"id":15521349,"name":"LeaderF","full_name":"Yggdroot/LeaderF","owner":{"login":"Yggdroot","id":2705841,"avatar_url":"https://avatars2.githubusercontent.com/u/2705841?v=4","gravatar_id":"","url":"https://api.github.com/users/Yggdroot","html_url":"https://github.com/Yggdroot","followers_url":"https://api.github.com/users/Yggdroot/followers","following_url":"https://api.github.com/users/Yggdroot/following{/other_user}","gists_url":"https://api.github.com/users/Yggdroot/gists{/gist_id}","starred_url":"https://api.github.com/users/Yggdroot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yggdroot/subscriptions","organizations_url":"https://api.github.com/users/Yggdroot/orgs","repos_url":"https://api.github.com/users/Yggdroot/repos","events_url":"https://api.github.com/users/Yggdroot/events{/privacy}","received_events_url":"https://api.github.com/users/Yggdroot/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Yggdroot/LeaderF","description":"An asynchronous fuzzy finder which is used to quickly locate files, buffers, mrus, tags, etc. in large project.","fork":false,"url":"https://api.github.com/repos/Yggdroot/LeaderF","forks_url":"https://api.github.com/repos/Yggdroot/LeaderF/forks","keys_url":"https://api.github.com/repos/Yggdroot/LeaderF/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Yggdroot/LeaderF/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Yggdroot/LeaderF/teams","hooks_url":"https://api.github.com/repos/Yggdroot/LeaderF/hooks","issue_events_url":"https://api.github.com/repos/Yggdroot/LeaderF/issues/events{/number}","events_url":"https://api.github.com/repos/Yggdroot/LeaderF/events","assignees_url":"https://api.github.com/repos/Yggdroot/LeaderF/assignees{/user}","branches_url":"https://api.github.com/repos/Yggdroot/LeaderF/branches{/branch}","tags_url":"https://api.github.com/repos/Yggdroot/LeaderF/tags","blobs_url":"https://api.github.com/repos/Yggdroot/LeaderF/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Yggdroot/LeaderF/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Yggdroot/LeaderF/git/refs{/sha}","trees_url":"https://api.github.com/repos/Yggdroot/LeaderF/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Yggdroot/LeaderF/statuses/{sha}","languages_url":"https://api.github.com/repos/Yggdroot/LeaderF/languages","stargazers_url":"https://api.github.com/repos/Yggdroot/LeaderF/stargazers","contributors_url":"https://api.github.com/repos/Yggdroot/LeaderF/contributors","subscribers_url":"https://api.github.com/repos/Yggdroot/LeaderF/subscribers","subscription_url":"https://api.github.com/repos/Yggdroot/LeaderF/subscription","commits_url":"https://api.github.com/repos/Yggdroot/LeaderF/commits{/sha}","git_commits_url":"https://api.github.com/repos/Yggdroot/LeaderF/git/commits{/sha}","comments_url":"https://api.github.com/repos/Yggdroot/LeaderF/comments{/number}","issue_comment_url":"https://api.github.com/repos/Yggdroot/LeaderF/issues/comments{/number}","contents_url":"https://api.github.com/repos/Yggdroot/LeaderF/contents/{+path}","compare_url":"https://api.github.com/repos/Yggdroot/LeaderF/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Yggdroot/LeaderF/merges","archive_url":"https://api.github.com/repos/Yggdroot/LeaderF/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Yggdroot/LeaderF/downloads","issues_url":"https://api.github.com/repos/Yggdroot/LeaderF/issues{/number}","pulls_url":"https://api.github.com/repos/Yggdroot/LeaderF/pulls{/number}","milestones_url":"https://api.github.com/repos/Yggdroot/LeaderF/milestones{/number}","notifications_url":"https://api.github.com/repos/Yggdroot/LeaderF/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Yggdroot/LeaderF/labels{/name}","releases_url":"https://api.github.com/repos/Yggdroot/LeaderF/releases{/id}","deployments_url":"https://api.github.com/repos/Yggdroot/LeaderF/deployments","created_at":"2013-12-30T05:43:36Z","updated_at":"2018-04-28T23:52:01Z","pushed_at":"2018-04-29T08:45:24Z","git_url":"git://github.com/Yggdroot/LeaderF.git","ssh_url":"git@github.com:Yggdroot/LeaderF.git","clone_url":"https://github.com/Yggdroot/LeaderF.git","svn_url":"https://github.com/Yggdroot/LeaderF","homepage":"","size":432,"stargazers_count":366,"watchers_count":366,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":10,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":30,"open_issues":10,"watchers":366,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/143"},"html":{"href":"https://github.com/Yggdroot/LeaderF/pull/143"},"issue":{"href":"https://api.github.com/repos/Yggdroot/LeaderF/issues/143"},"comments":{"href":"https://api.github.com/repos/Yggdroot/LeaderF/issues/143/comments"},"review_comments":{"href":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/143/comments"},"review_comment":{"href":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Yggdroot/LeaderF/pulls/143/commits"},"statuses":{"href":"https://api.github.com/repos/Yggdroot/LeaderF/statuses/30f88f5b81c3a43248c8d50346a9bfb8179c41fc"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Yggdroot"}}