* swiper.el (swiper--update-input-ivy): Update.
This results in double the window-height amount of lines being
heightlighted, instead of just window-height. But at least it doesn't
happen that some candidates within the current window aren't highlighted
since they're beyond the outdated window-start and window-end.
An alternative would be to use `redisplay' to update `window-start' and
`window-end', but that causes excessive blinking.
* ivy-test.el: Add a require.
;; see <http://www.gnu.org/licenses/>.
(require 'ert)
+(require 'ivy)
(defvar ivy-expr nil
"Holds a test expression to evaluate with `ivy-eval'.")
(overlay-put ov 'face 'swiper-line-face)
(overlay-put ov 'window swiper--window)
(push ov swiper--overlays))
- (swiper--add-overlays
- re
- (window-start swiper--window)
- (window-end swiper--window t)))))
+ (let ((wh (window-height)))
+ (swiper--add-overlays
+ re
+ (save-excursion
+ (forward-line (- wh))
+ (point))
+ (save-excursion
+ (forward-line wh)
+ (point)))))))
(defun swiper--add-overlays (re beg end)
"Add overlays for RE regexp in current buffer between BEG and END."