[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master a94ca83 01/18: swiper.el: Add a work-around for window-sta
From: |
Oleh Krehel |
Subject: |
[elpa] master a94ca83 01/18: swiper.el: Add a work-around for window-start not being current |
Date: |
Mon, 20 Apr 2015 12:39:01 +0000 |
branch: master
commit a94ca830f844342293ae5b819b7c489fa5fa6a1f
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
swiper.el: Add a work-around for window-start not being current
* 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.
---
ivy-test.el | 1 +
swiper.el | 13 +++++++++----
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/ivy-test.el b/ivy-test.el
index a33f886..957f824 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -20,6 +20,7 @@
;; see <http://www.gnu.org/licenses/>.
(require 'ert)
+(require 'ivy)
(defvar ivy-expr nil
"Holds a test expression to evaluate with `ivy-eval'.")
diff --git a/swiper.el b/swiper.el
index d69e4ae..fbe99a3 100644
--- a/swiper.el
+++ b/swiper.el
@@ -240,10 +240,15 @@ When non-nil, INITIAL-INPUT is the initial search
pattern."
(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."
- [elpa] master updated (d4a79d3 -> 2f4c2c1), Oleh Krehel, 2015/04/20
- [elpa] master d2f754d 02/18: ivy.el (ivy-alt-done): Update for 0 candidates, Oleh Krehel, 2015/04/20
- [elpa] master 378ee58 03/18: Add "C-v" and "M-v" scrolling, Oleh Krehel, 2015/04/20
- [elpa] master f5a32bf 04/18: Add a command to grep the current git repo, Oleh Krehel, 2015/04/20
- [elpa] master 9f21e1d 06/18: Add a matching optimization, Oleh Krehel, 2015/04/20
- [elpa] master a9a4e81 05/18: counsel.el (counsel-git-grep): Fix the default-directory, Oleh Krehel, 2015/04/20
- [elpa] master 539fe7d 07/18: ivy.el (ivy-completions): Fix an optimization, Oleh Krehel, 2015/04/20
- [elpa] master 23c0e6a 08/18: ivy.el (ivy-done): Update for non-matching file names, Oleh Krehel, 2015/04/20
- [elpa] master a94ca83 01/18: swiper.el: Add a work-around for window-start not being current,
Oleh Krehel <=
- [elpa] master cafcfb9 10/18: Allow "C-." to jump to current symbol definition, Oleh Krehel, 2015/04/20
- [elpa] master d0f3826 11/18: ivy.el (ivy--preselect-index): Give priority to perfect match, Oleh Krehel, 2015/04/20
- [elpa] master 297008b 09/18: Allow to customize the file sorting order, Oleh Krehel, 2015/04/20
- [elpa] master 3282f78 13/18: Speed up the default file sorting even more, Oleh Krehel, 2015/04/20
- [elpa] master 525a19d 14/18: Propertize directories with ivy-subdir face, Oleh Krehel, 2015/04/20
- [elpa] master 10af5a6 16/18: ivy.el (ivy-done): Still expand "./" though, Oleh Krehel, 2015/04/20
- [elpa] master e71e4d2 12/18: Speed up the default file sorting, Oleh Krehel, 2015/04/20
- [elpa] master 61a95c4 15/18: Don't expand the default when completing file names, Oleh Krehel, 2015/04/20
- [elpa] master efa18ec 17/18: swiper.el: Bump version, Oleh Krehel, 2015/04/20
- [elpa] master 2f4c2c1 18/18: Merge commit 'efa18eca10e5a0e05043f872cf9945842bb3a034' from swiper, Oleh Krehel, 2015/04/20