[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 7defba2 327/399: ivy.el (ivy-avy): Fix when there's a scro
From: |
Oleh Krehel |
Subject: |
[elpa] master 7defba2 327/399: ivy.el (ivy-avy): Fix when there's a scroll |
Date: |
Sat, 20 Jul 2019 14:57:50 -0400 (EDT) |
branch: master
commit 7defba28cd53ace60e21b29855261ee22d566553
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-avy): Fix when there's a scroll
* ivy.el (ivy--avy-action): Fix.
* ivy-test.el (ivy-avy): Add test.
* elpa.el: Add so that avy can be loaded.
* Makefile: Load elpa.el with "make test" and "make plain"
---
Makefile | 2 +-
elpa.el | 6 ++++++
ivy-test.el | 6 ++++++
ivy.el | 8 +++++---
4 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index c6f3eca..2ad6a00 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
emacs ?= emacs
elmake = $(emacs) -batch -l makefi.el -f
-LOAD = -l colir.el -l ivy-overlay.el -l ivy.el -l swiper.el -l counsel.el
+LOAD = -l elpa.el -l colir.el -l ivy-overlay.el -l ivy.el -l swiper.el -l
counsel.el
RM ?= rm -f
all: test
diff --git a/elpa.el b/elpa.el
new file mode 100644
index 0000000..e49b8d4
--- /dev/null
+++ b/elpa.el
@@ -0,0 +1,6 @@
+(setq package-user-dir
+ (expand-file-name
+ (format "~/.elpa/%s/elpa"
+ (concat emacs-version (when (getenv "MELPA_STABLE")
"-stable")))))
+(package-initialize)
+(add-to-list 'load-path default-directory)
diff --git a/ivy-test.el b/ivy-test.el
index f40f63d..bbae82b 100644
--- a/ivy-test.el
+++ b/ivy-test.el
@@ -1211,6 +1211,12 @@ a buffer visiting a file."
:dir "tests/find-file/directories-with-spaces/"))
"tests/find-file/directories-with-spaces/bar baz ii/file2"))))
+(ert-deftest ivy-avy ()
+ (let ((enable-recursive-minibuffers t)
+ (read-numbers '(ivy-read "test: " (mapcar #'number-to-string
(number-sequence 1 100)))))
+ (should (string= (ivy-with read-numbers "C-' a") "1"))
+ (should (string= (ivy-with read-numbers "C-v C-' d") "7"))))
+
(provide 'ivy-test)
;;; ivy-test.el ends here
diff --git a/ivy.el b/ivy.el
index 03566ca..2ab556d 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1623,9 +1623,11 @@ This string is inserted into the minibuffer.")
(defun ivy--avy-action (pt)
(when (number-or-marker-p pt)
- (ivy--done
- (substring-no-properties
- (nth (- (line-number-at-pos pt) 2) ivy--old-cands)))))
+ (let ((bnd (ivy--minibuffer-index-bounds
+ ivy--index ivy--length ivy-height)))
+ (ivy--done
+ (substring-no-properties
+ (nth (+ (car bnd) (- (line-number-at-pos pt) 2)) ivy--old-cands))))))
(defun ivy-avy ()
"Jump to one of the current ivy candidates."
- [elpa] master d060eea 313/399: swiper.el (swiper-query-replace): Add query-replace-compile-replacement, (continued)
- [elpa] master d060eea 313/399: swiper.el (swiper-query-replace): Add query-replace-compile-replacement, Oleh Krehel, 2019/07/20
- [elpa] master 09b9508 321/399: ivy.el (ivy--find-file-action): Fix for virtual buffers, Oleh Krehel, 2019/07/20
- [elpa] master 7d46450 311/399: Add more information about the collection argument in `ivy-read`., Oleh Krehel, 2019/07/20
- [elpa] master 676a8ee 318/399: swiper.el (swiper-isearch-current-match): Remove unused face, Oleh Krehel, 2019/07/20
- [elpa] master ba626e7 317/399: ivy.el (ivy-next-history-element): Use minibuffer-default for dired-dwim-target, Oleh Krehel, 2019/07/20
- [elpa] master 51e765e 316/399: ivy.el (ivy-partial): Return nil when comletion was not updated, Oleh Krehel, 2019/07/20
- [elpa] master 16d2268 320/399: Fix ivy-push/switch-view windows layout, Oleh Krehel, 2019/07/20
- [elpa] master d260c48 322/399: swiper.el: Obey search-invisible, Oleh Krehel, 2019/07/20
- [elpa] master de8842e 323/399: Add ivy-switch-buffer-map to counsel-switch-buffer, Oleh Krehel, 2019/07/20
- [elpa] master 0d87297 326/399: counsel.el (counsel-open-buffer-file-externally): Cleanup, Oleh Krehel, 2019/07/20
- [elpa] master 7defba2 327/399: ivy.el (ivy-avy): Fix when there's a scroll,
Oleh Krehel <=
- [elpa] master 07c65b3 325/399: ivy.el (ivy--set-index-dynamic-collection): Extract, Oleh Krehel, 2019/07/20
- [elpa] master 400d56f 319/399: counsel.el (counsel-open-buffer-file-externally): New function, Oleh Krehel, 2019/07/20
- [elpa] master 704b1de 328/399: ivy.el (ivy-avy): Allow to scroll with "C-v" and "M-v", Oleh Krehel, 2019/07/20
- [elpa] master 7183491 332/399: ivy.el (ivy--minibuffer-setup): Avoid extra call to ivy--exhibit, Oleh Krehel, 2019/07/20
- [elpa] master a249d15 329/399: ivy-test.el (ivy-avy): Only run if avy is installed, Oleh Krehel, 2019/07/20
- [elpa] master 15f8e10 330/399: .travis.yml: Add emacs-25.3 and emacs-26.2, Oleh Krehel, 2019/07/20
- [elpa] master d752db5 333/399: counsel.el (counsel-find-file-extern-extensions): New defcustom, Oleh Krehel, 2019/07/20
- [elpa] master cfb8d49 335/399: counsel.el (counsel-find-file-ignore-regexp): Add lockfiles to dotfiles, Oleh Krehel, 2019/07/20
- [elpa] master 011626a 343/399: ivy.el (ivy-occur-press): Improve when window config changed, Oleh Krehel, 2019/07/20
- [elpa] master 8db9cc1 349/399: swiper.el (swiper--add-cursor-overlay): Avoid a very wide cursor on tab chars, Oleh Krehel, 2019/07/20