mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
Uniquify completion candidates of whole lines
If the same line is present more than once in the buffer, it will be offered more than once as a candidate. This commit deletes duplicate lines from the completion list. Signed-off-by: Rudi Grinberg <rudi.grinberg@gmail.com>
This commit is contained in:
@ -129,12 +129,13 @@ C-x C-l."
|
|||||||
(`candidates
|
(`candidates
|
||||||
(all-completions
|
(all-completions
|
||||||
arg
|
arg
|
||||||
(split-string
|
(delete-dups
|
||||||
(replace-regexp-in-string
|
(split-string
|
||||||
"^[\t\s]+" ""
|
(replace-regexp-in-string
|
||||||
(concat (buffer-substring-no-properties (point-min) (line-beginning-position))
|
"^[\t\s]+" ""
|
||||||
(buffer-substring-no-properties (line-end-position) (point-max))))
|
(concat (buffer-substring-no-properties (point-min) (line-beginning-position))
|
||||||
"\\(\r\n\\|[\n\r]\\)" t)))))
|
(buffer-substring-no-properties (line-end-position) (point-max))))
|
||||||
|
"\\(\r\n\\|[\n\r]\\)" t))))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +company/dict-or-keywords ()
|
(defun +company/dict-or-keywords ()
|
||||||
|
Reference in New Issue
Block a user