{"action":"created","issue":{"url":"https://api.github.com/repos/tacahiroy/ctrlp-funky/issues/74","labels_url":"https://api.github.com/repos/tacahiroy/ctrlp-funky/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/tacahiroy/ctrlp-funky/issues/74/comments","events_url":"https://api.github.com/repos/tacahiroy/ctrlp-funky/issues/74/events","html_url":"https://github.com/tacahiroy/ctrlp-funky/pull/74","id":99206659,"number":74,"title":"add sort_candidates_reverse feature","user":{"login":"ompugao","id":954543,"avatar_url":"https://avatars.githubusercontent.com/u/954543?v=3","gravatar_id":"","url":"https://api.github.com/users/ompugao","html_url":"https://github.com/ompugao","followers_url":"https://api.github.com/users/ompugao/followers","following_url":"https://api.github.com/users/ompugao/following{/other_user}","gists_url":"https://api.github.com/users/ompugao/gists{/gist_id}","starred_url":"https://api.github.com/users/ompugao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ompugao/subscriptions","organizations_url":"https://api.github.com/users/ompugao/orgs","repos_url":"https://api.github.com/users/ompugao/repos","events_url":"https://api.github.com/users/ompugao/events{/privacy}","received_events_url":"https://api.github.com/users/ompugao/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-08-05T13:39:41Z","updated_at":"2015-08-07T12:19:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tacahiroy/ctrlp-funky/pulls/74","html_url":"https://github.com/tacahiroy/ctrlp-funky/pull/74","diff_url":"https://github.com/tacahiroy/ctrlp-funky/pull/74.diff","patch_url":"https://github.com/tacahiroy/ctrlp-funky/pull/74.patch"},"body":"I want kind of this reverse-sorting feature in ctrlp-funky.\r\n\r\nfunction 's:sort_candidates_reverse' is almost all the same as function 's:sort_candidates', I know it's not clean.\r\n\r\ncould you tell how i should fix this pull-req?\r\nor, could you revise and merge this into master?\r\n\r\nthanks."},"comment":{"url":"https://api.github.com/repos/tacahiroy/ctrlp-funky/issues/comments/128686304","html_url":"https://github.com/tacahiroy/ctrlp-funky/pull/74#issuecomment-128686304","issue_url":"https://api.github.com/repos/tacahiroy/ctrlp-funky/issues/74","id":128686304,"user":{"login":"tacahiroy","id":76614,"avatar_url":"https://avatars.githubusercontent.com/u/76614?v=3","gravatar_id":"","url":"https://api.github.com/users/tacahiroy","html_url":"https://github.com/tacahiroy","followers_url":"https://api.github.com/users/tacahiroy/followers","following_url":"https://api.github.com/users/tacahiroy/following{/other_user}","gists_url":"https://api.github.com/users/tacahiroy/gists{/gist_id}","starred_url":"https://api.github.com/users/tacahiroy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tacahiroy/subscriptions","organizations_url":"https://api.github.com/users/tacahiroy/orgs","repos_url":"https://api.github.com/users/tacahiroy/repos","events_url":"https://api.github.com/users/tacahiroy/events{/privacy}","received_events_url":"https://api.github.com/users/tacahiroy/received_events","type":"User","site_admin":false},"created_at":"2015-08-07T12:19:56Z","updated_at":"2015-08-07T12:19:56Z","body":"Simply, like this change is enough to do the job in this case, IMHO:\r\n```diff\r\n--- i/autoload/ctrlp/funky.vim\r\n+++ w/autoload/ctrlp/funky.vim\r\n@@ -300,6 +300,9 @@ function! ctrlp#funky#extract(bufnr, patterns)\r\n     endfor\r\n\r\n     let sorted = sort(candidates, function('s:sort_candidates'))\r\n+    if s:sort_reverse\r\n+      let sorted = reverse(sorted)\r\n+    endif\r\n     let prior = map(sort(mru, function('s:sort_mru')), 'v:val[0]')\r\n\r\n     if s:use_cache && s:fu.is_real_file(a:bufnr)\r\n```\r\n\r\nI'm curious why do you want to have this feature."}}