{"action":"created","comment":{"url":"https://api.github.com/repos/powerline/powerline/pulls/comments/47436056","id":47436056,"diff_hunk":"@@ -0,0 +1,76 @@\n+# vim:fileencoding=utf-8\n+from __future__ import (absolute_import, division, print_function,\n+\t\t\t\t\t\tunicode_literals)\n+\n+try:\n+\timport vim\n+except ImportError:\n+\tvim = object()\n+\n+from powerline.bindings.vim import vim_getvar\n+\n+\n+def marked(pl):\n+    '''Returns boolean indicating whether anything is marked or not.\n+\n+    Highlight groups used: ``ctrlp:marked``.\n+    '''\n+    status = vim_getvar('_powerline_ctrlp_status')\n+    if 'prog' in status:\n+        return []\n+    return None if status['marked'] == ' <->' else [{\n+        'highlight_groups': ['ctrlp:marked'],\n+        'contents': status['marked'].strip()\n+    }]\n+\n+def mode(pl):\n+    '''Returns current mode.\n+\n+    Highlight groups used: ``ctrlp:status``.\n+    '''\n+    status = vim_getvar('_powerline_ctrlp_status')\n+    if 'prog' in status:\n+        return []\n+    return [{\n+        'highlight_groups': ['ctrlp:status'],\n+        'contents': ' ' + status['item'] + ' '\n+    }]\n+\n+def mode_prev(pl):\n+    '''Returns previous mode.\n+\n+    Highlight groups used: ``ctrlp:status_other``.\n+    '''\n+    status = vim_getvar('_powerline_ctrlp_status')\n+    if 'prog' in status:\n+        return []\n+    return [{\n+        'highlight_groups': ['ctrlp:status_other'],\n+        'contents': status['prev'] + ' '\n+    }]\n+","path":"powerline/segments/vim/plugin/ctrlp.py","position":51,"original_position":51,"commit_id":"66fdf9e34ca3b476fa7a33ed5d98a4dc97995b46","original_commit_id":"66fdf9e34ca3b476fa7a33ed5d98a4dc97995b46","user":{"login":"ZyX-I","id":322097,"avatar_url":"https://avatars.githubusercontent.com/u/322097?v=3","gravatar_id":"","url":"https://api.github.com/users/ZyX-I","html_url":"https://github.com/ZyX-I","followers_url":"https://api.github.com/users/ZyX-I/followers","following_url":"https://api.github.com/users/ZyX-I/following{/other_user}","gists_url":"https://api.github.com/users/ZyX-I/gists{/gist_id}","starred_url":"https://api.github.com/users/ZyX-I/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZyX-I/subscriptions","organizations_url":"https://api.github.com/users/ZyX-I/orgs","repos_url":"https://api.github.com/users/ZyX-I/repos","events_url":"https://api.github.com/users/ZyX-I/events{/privacy}","received_events_url":"https://api.github.com/users/ZyX-I/received_events","type":"User","site_admin":false},"body":"Two lines.","created_at":"2015-12-12T20:07:02Z","updated_at":"2015-12-12T20:07:02Z","html_url":"https://github.com/powerline/powerline/pull/1490#discussion_r47436056","pull_request_url":"https://api.github.com/repos/powerline/powerline/pulls/1490","_links":{"self":{"href":"https://api.github.com/repos/powerline/powerline/pulls/comments/47436056"},"html":{"href":"https://github.com/powerline/powerline/pull/1490#discussion_r47436056"},"pull_request":{"href":"https://api.github.com/repos/powerline/powerline/pulls/1490"}}},"pull_request":{"url":"https://api.github.com/repos/powerline/powerline/pulls/1490","id":50686833,"html_url":"https://github.com/powerline/powerline/pull/1490","diff_url":"https://github.com/powerline/powerline/pull/1490.diff","patch_url":"https://github.com/powerline/powerline/pull/1490.patch","issue_url":"https://api.github.com/repos/powerline/powerline/issues/1490","number":1490,"state":"open","locked":false,"title":"ctrlp statusline","user":{"login":"sassanh","id":1270688,"avatar_url":"https://avatars.githubusercontent.com/u/1270688?v=3","gravatar_id":"","url":"https://api.github.com/users/sassanh","html_url":"https://github.com/sassanh","followers_url":"https://api.github.com/users/sassanh/followers","following_url":"https://api.github.com/users/sassanh/following{/other_user}","gists_url":"https://api.github.com/users/sassanh/gists{/gist_id}","starred_url":"https://api.github.com/users/sassanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sassanh/subscriptions","organizations_url":"https://api.github.com/users/sassanh/orgs","repos_url":"https://api.github.com/users/sassanh/repos","events_url":"https://api.github.com/users/sassanh/events{/privacy}","received_events_url":"https://api.github.com/users/sassanh/received_events","type":"User","site_admin":false},"body":"PR for https://github.com/powerline/powerline/issues/1489","created_at":"2015-11-13T20:19:16Z","updated_at":"2015-12-12T20:07:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7b7aa7d8c6f4fa7b7c3ba35fe26d4acc375d0a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/powerline/powerline/pulls/1490/commits","review_comments_url":"https://api.github.com/repos/powerline/powerline/pulls/1490/comments","review_comment_url":"https://api.github.com/repos/powerline/powerline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/powerline/powerline/issues/1490/comments","statuses_url":"https://api.github.com/repos/powerline/powerline/statuses/66fdf9e34ca3b476fa7a33ed5d98a4dc97995b46","head":{"label":"sassanh:ctrlp","ref":"ctrlp","sha":"66fdf9e34ca3b476fa7a33ed5d98a4dc97995b46","user":{"login":"sassanh","id":1270688,"avatar_url":"https://avatars.githubusercontent.com/u/1270688?v=3","gravatar_id":"","url":"https://api.github.com/users/sassanh","html_url":"https://github.com/sassanh","followers_url":"https://api.github.com/users/sassanh/followers","following_url":"https://api.github.com/users/sassanh/following{/other_user}","gists_url":"https://api.github.com/users/sassanh/gists{/gist_id}","starred_url":"https://api.github.com/users/sassanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sassanh/subscriptions","organizations_url":"https://api.github.com/users/sassanh/orgs","repos_url":"https://api.github.com/users/sassanh/repos","events_url":"https://api.github.com/users/sassanh/events{/privacy}","received_events_url":"https://api.github.com/users/sassanh/received_events","type":"User","site_admin":false},"repo":{"id":46144997,"name":"powerline","full_name":"sassanh/powerline","owner":{"login":"sassanh","id":1270688,"avatar_url":"https://avatars.githubusercontent.com/u/1270688?v=3","gravatar_id":"","url":"https://api.github.com/users/sassanh","html_url":"https://github.com/sassanh","followers_url":"https://api.github.com/users/sassanh/followers","following_url":"https://api.github.com/users/sassanh/following{/other_user}","gists_url":"https://api.github.com/users/sassanh/gists{/gist_id}","starred_url":"https://api.github.com/users/sassanh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sassanh/subscriptions","organizations_url":"https://api.github.com/users/sassanh/orgs","repos_url":"https://api.github.com/users/sassanh/repos","events_url":"https://api.github.com/users/sassanh/events{/privacy}","received_events_url":"https://api.github.com/users/sassanh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sassanh/powerline","description":"Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.","fork":true,"url":"https://api.github.com/repos/sassanh/powerline","forks_url":"https://api.github.com/repos/sassanh/powerline/forks","keys_url":"https://api.github.com/repos/sassanh/powerline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sassanh/powerline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sassanh/powerline/teams","hooks_url":"https://api.github.com/repos/sassanh/powerline/hooks","issue_events_url":"https://api.github.com/repos/sassanh/powerline/issues/events{/number}","events_url":"https://api.github.com/repos/sassanh/powerline/events","assignees_url":"https://api.github.com/repos/sassanh/powerline/assignees{/user}","branches_url":"https://api.github.com/repos/sassanh/powerline/branches{/branch}","tags_url":"https://api.github.com/repos/sassanh/powerline/tags","blobs_url":"https://api.github.com/repos/sassanh/powerline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sassanh/powerline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sassanh/powerline/git/refs{/sha}","trees_url":"https://api.github.com/repos/sassanh/powerline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sassanh/powerline/statuses/{sha}","languages_url":"https://api.github.com/repos/sassanh/powerline/languages","stargazers_url":"https://api.github.com/repos/sassanh/powerline/stargazers","contributors_url":"https://api.github.com/repos/sassanh/powerline/contributors","subscribers_url":"https://api.github.com/repos/sassanh/powerline/subscribers","subscription_url":"https://api.github.com/repos/sassanh/powerline/subscription","commits_url":"https://api.github.com/repos/sassanh/powerline/commits{/sha}","git_commits_url":"https://api.github.com/repos/sassanh/powerline/git/commits{/sha}","comments_url":"https://api.github.com/repos/sassanh/powerline/comments{/number}","issue_comment_url":"https://api.github.com/repos/sassanh/powerline/issues/comments{/number}","contents_url":"https://api.github.com/repos/sassanh/powerline/contents/{+path}","compare_url":"https://api.github.com/repos/sassanh/powerline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sassanh/powerline/merges","archive_url":"https://api.github.com/repos/sassanh/powerline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sassanh/powerline/downloads","issues_url":"https://api.github.com/repos/sassanh/powerline/issues{/number}","pulls_url":"https://api.github.com/repos/sassanh/powerline/pulls{/number}","milestones_url":"https://api.github.com/repos/sassanh/powerline/milestones{/number}","notifications_url":"https://api.github.com/repos/sassanh/powerline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sassanh/powerline/labels{/name}","releases_url":"https://api.github.com/repos/sassanh/powerline/releases{/id}","created_at":"2015-11-13T20:16:49Z","updated_at":"2015-11-13T20:16:51Z","pushed_at":"2015-12-12T19:08:15Z","git_url":"git://github.com/sassanh/powerline.git","ssh_url":"git@github.com:sassanh/powerline.git","clone_url":"https://github.com/sassanh/powerline.git","svn_url":"https://github.com/sassanh/powerline","homepage":"https://powerline.readthedocs.org/en/latest/","size":3752,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"powerline:develop","ref":"develop","sha":"d611cc2e439e02a123b4f208767c8dc5f72ce567","user":{"login":"powerline","id":10100576,"avatar_url":"https://avatars.githubusercontent.com/u/10100576?v=3","gravatar_id":"","url":"https://api.github.com/users/powerline","html_url":"https://github.com/powerline","followers_url":"https://api.github.com/users/powerline/followers","following_url":"https://api.github.com/users/powerline/following{/other_user}","gists_url":"https://api.github.com/users/powerline/gists{/gist_id}","starred_url":"https://api.github.com/users/powerline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/powerline/subscriptions","organizations_url":"https://api.github.com/users/powerline/orgs","repos_url":"https://api.github.com/users/powerline/repos","events_url":"https://api.github.com/users/powerline/events{/privacy}","received_events_url":"https://api.github.com/users/powerline/received_events","type":"Organization","site_admin":false},"repo":{"id":4637221,"name":"powerline","full_name":"powerline/powerline","owner":{"login":"powerline","id":10100576,"avatar_url":"https://avatars.githubusercontent.com/u/10100576?v=3","gravatar_id":"","url":"https://api.github.com/users/powerline","html_url":"https://github.com/powerline","followers_url":"https://api.github.com/users/powerline/followers","following_url":"https://api.github.com/users/powerline/following{/other_user}","gists_url":"https://api.github.com/users/powerline/gists{/gist_id}","starred_url":"https://api.github.com/users/powerline/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/powerline/subscriptions","organizations_url":"https://api.github.com/users/powerline/orgs","repos_url":"https://api.github.com/users/powerline/repos","events_url":"https://api.github.com/users/powerline/events{/privacy}","received_events_url":"https://api.github.com/users/powerline/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/powerline/powerline","description":"Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.","fork":false,"url":"https://api.github.com/repos/powerline/powerline","forks_url":"https://api.github.com/repos/powerline/powerline/forks","keys_url":"https://api.github.com/repos/powerline/powerline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/powerline/powerline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/powerline/powerline/teams","hooks_url":"https://api.github.com/repos/powerline/powerline/hooks","issue_events_url":"https://api.github.com/repos/powerline/powerline/issues/events{/number}","events_url":"https://api.github.com/repos/powerline/powerline/events","assignees_url":"https://api.github.com/repos/powerline/powerline/assignees{/user}","branches_url":"https://api.github.com/repos/powerline/powerline/branches{/branch}","tags_url":"https://api.github.com/repos/powerline/powerline/tags","blobs_url":"https://api.github.com/repos/powerline/powerline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/powerline/powerline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/powerline/powerline/git/refs{/sha}","trees_url":"https://api.github.com/repos/powerline/powerline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/powerline/powerline/statuses/{sha}","languages_url":"https://api.github.com/repos/powerline/powerline/languages","stargazers_url":"https://api.github.com/repos/powerline/powerline/stargazers","contributors_url":"https://api.github.com/repos/powerline/powerline/contributors","subscribers_url":"https://api.github.com/repos/powerline/powerline/subscribers","subscription_url":"https://api.github.com/repos/powerline/powerline/subscription","commits_url":"https://api.github.com/repos/powerline/powerline/commits{/sha}","git_commits_url":"https://api.github.com/repos/powerline/powerline/git/commits{/sha}","comments_url":"https://api.github.com/repos/powerline/powerline/comments{/number}","issue_comment_url":"https://api.github.com/repos/powerline/powerline/issues/comments{/number}","contents_url":"https://api.github.com/repos/powerline/powerline/contents/{+path}","compare_url":"https://api.github.com/repos/powerline/powerline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/powerline/powerline/merges","archive_url":"https://api.github.com/repos/powerline/powerline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/powerline/powerline/downloads","issues_url":"https://api.github.com/repos/powerline/powerline/issues{/number}","pulls_url":"https://api.github.com/repos/powerline/powerline/pulls{/number}","milestones_url":"https://api.github.com/repos/powerline/powerline/milestones{/number}","notifications_url":"https://api.github.com/repos/powerline/powerline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/powerline/powerline/labels{/name}","releases_url":"https://api.github.com/repos/powerline/powerline/releases{/id}","created_at":"2012-06-12T12:48:40Z","updated_at":"2015-12-12T18:14:19Z","pushed_at":"2015-12-12T19:08:16Z","git_url":"git://github.com/powerline/powerline.git","ssh_url":"git@github.com:powerline/powerline.git","clone_url":"https://github.com/powerline/powerline.git","svn_url":"https://github.com/powerline/powerline","homepage":"https://powerline.readthedocs.org/en/latest/","size":5282,"stargazers_count":5124,"watchers_count":5124,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":460,"mirror_url":null,"open_issues_count":57,"forks":460,"open_issues":57,"watchers":5124,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/powerline/powerline/pulls/1490"},"html":{"href":"https://github.com/powerline/powerline/pull/1490"},"issue":{"href":"https://api.github.com/repos/powerline/powerline/issues/1490"},"comments":{"href":"https://api.github.com/repos/powerline/powerline/issues/1490/comments"},"review_comments":{"href":"https://api.github.com/repos/powerline/powerline/pulls/1490/comments"},"review_comment":{"href":"https://api.github.com/repos/powerline/powerline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/powerline/powerline/pulls/1490/commits"},"statuses":{"href":"https://api.github.com/repos/powerline/powerline/statuses/66fdf9e34ca3b476fa7a33ed5d98a4dc97995b46"}}}}