]> code.delx.au - gnu-emacs-elpa/blobdiff - counsel.el
ivy.el (ivy--format-minibuffer-line): Update
[gnu-emacs-elpa] / counsel.el
index 7e9c2f74226939510083a37765d67f44dbc41575..81c9c2565305731b00872aed8639b316c3d571d0 100644 (file)
@@ -144,8 +144,9 @@ Or the time of the last minibuffer update.")
             (ivy--sort-maybe
              cands))
            (setq counsel-grep-last-line nil)
-           (setq counsel--async-duration
-                 (time-to-seconds (time-since counsel--async-start)))
+           (when counsel--async-start
+             (setq counsel--async-duration
+                   (time-to-seconds (time-since counsel--async-start))))
            (let ((re (funcall ivy--regex-function ivy-text)))
              (unless (stringp re)
                (setq re (caar re)))
@@ -1507,6 +1508,7 @@ the command."
   "Call `swiper' for small buffers and `counsel-grep' for large ones."
   (interactive)
   (if (and (buffer-file-name)
+           (not (buffer-narrowed-p))
            (not (ignore-errors
                   (file-remote-p (buffer-file-name))))
            (> (buffer-size)