branch: master commit 9cc75eb095ba158b31fc1fcf771a613c7a5fd908 Author: Oleh Krehel <ohwoeo...@gmail.com> Commit: Oleh Krehel <ohwoeo...@gmail.com>
Adjust the swiper regexp builder for the display change * swiper.el (swiper--re-builder): Update. The old re-builder was for when the line numbers were part of the candidates. Now the line numbers are the text properties of the candidates. Fixes #262 --- swiper.el | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/swiper.el b/swiper.el index 8ad9c54..f702e90 100644 --- a/swiper.el +++ b/swiper.el @@ -320,12 +320,10 @@ there have line numbers. In the buffer, `ivy--regex' should be used." ((string-match "^\\^" str) (setq ivy--old-re "") (let ((re (ivy--regex-plus (substring str 1)))) - (format "^[0-9][0-9 ]\\{%d\\}%s" - swiper--width - (if (zerop ivy--subexps) - (prog1 (format "\\(%s\\)" re) - (setq ivy--subexps 1)) - re)))) + (if (zerop ivy--subexps) + (prog1 (format "^ ?\\(%s\\)" re) + (setq ivy--subexps 1)) + (format "^ %s" re)))) (t (ivy--regex-plus str))))