branch: master commit 37d52cca1d3875e84c06fc519ec497c0cb5a763b Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
swiper.el (swiper--update-input-ivy): Replace "\t" `swiper--candidates' replaces "\t" with four spaces for a consistent look in the minibuffer. By the domino effect, this affects `swiper--re-builder' and `swiper--update-input-ivy'. --- swiper.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/swiper.el b/swiper.el index 2bc552f..923b647 100644 --- a/swiper.el +++ b/swiper.el @@ -312,6 +312,8 @@ When non-nil, INITIAL-INPUT is the initial search pattern." (interactive) (swiper--ivy initial-input)) +(declare-function string-trim-right "subr-x") + (defun swiper-occur () "Generate a custom occur buffer for `swiper'." (ivy-occur-grep-mode) @@ -471,7 +473,9 @@ Matched candidates should have `swiper-invocation-face'." (with-ivy-window (swiper--cleanup) (when (> (length ivy--current) 0) - (let* ((re (funcall ivy--regex-function ivy-text)) + (let* ((re (replace-regexp-in-string + " " "\t" + (funcall ivy--regex-function ivy-text))) (re (if (stringp re) re (caar re))) (str (get-text-property 0 'display ivy--current)) (num (if (string-match "^[0-9]+" str)