Skip to content

Commit

Permalink
Remove experimental adjust-metadata function
Browse files Browse the repository at this point in the history
  • Loading branch information
jojojames committed Nov 30, 2024
1 parent 673a41e commit a4c650b
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions fussy.el
Original file line number Diff line number Diff line change
Expand Up @@ -800,26 +800,6 @@ If SCORE does not have indices to highlight, return OBJ unmodified."
`((cycle-sort-function . fussy--sort)))
,@(cdr metadata))))

(defun fussy--adjust-metadata-fzf-native-all-scoring (metadata)
"`fussy-fzf-score' takes care of sorting, just return as is."
(let ((flex-is-filtering-p
;; JT@2019-12-23: FIXME: this is kinda wrong. What we need
;; to test here is "some input that actually leads/led to
;; flex filtering", not "something after the minibuffer
;; prompt". E.g. The latter is always true for file
;; searches, meaning we'll be doing extra work when we
;; needn't.
(and
fussy-can-adjust-metadata-p
(or (not (window-minibuffer-p))
(> (point-max) (minibuffer-prompt-end))))))
`(metadata
,@(and flex-is-filtering-p
`((display-sort-function . identity)))
,@(and flex-is-filtering-p
`((cycle-sort-function . identity)))
,@(cdr metadata))))

(defun fussy--sort (completions)
"Sort COMPLETIONS using `completion-score' and completion length."
(sort
Expand Down

0 comments on commit a4c650b

Please sign in to comment.