Open
Conversation
Owner
|
Simply, like this change is enough to do the job in this case, IMHO: --- i/autoload/ctrlp/funky.vim
+++ w/autoload/ctrlp/funky.vim
@@ -300,6 +300,9 @@ function! ctrlp#funky#extract(bufnr, patterns)
endfor
let sorted = sort(candidates, function('s:sort_candidates'))
+ if s:sort_reverse
+ let sorted = reverse(sorted)
+ endif
let prior = map(sort(mru, function('s:sort_mru')), 'v:val[0]')
if s:use_cache && s:fu.is_real_file(a:bufnr)I'm curious why do you want to have this feature. |
Author
72b166f to
856d0ad
Compare
856d0ad to
6ab8c6e
Compare
Author
|
ah, thanks for your advice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


I want kind of this reverse-sorting feature in ctrlp-funky.
function 's:sort_candidates_reverse' is almost all the same as function 's:sort_candidates', I know it's not clean.
could you tell how i should fix this pull-req?
or, could you revise and merge this into master?
thanks.