[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master bb68b67 122/167: Intermediate fix for :preselect with visu
From: |
Oleh Krehel |
Subject: |
[elpa] master bb68b67 122/167: Intermediate fix for :preselect with visual-line-mode |
Date: |
Tue, 08 Dec 2015 10:50:27 +0000 |
branch: master
commit bb68b67b2bc6f95ddf667e4c34eb2902bcbf604b
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Intermediate fix for :preselect with visual-line-mode
* swiper.el (swiper--ivy): Use `beginning-of-visual-line' and
`end-of-visual-line'. This should fix the preselect problem for
non-duplicate buffer lines.
For duplicate buffer lines, a `visual-line-number-at-pos' function is
necessary. I don't currently know how to implement such a function in an
efficient way. The naive implementation could be pretty inefficient,
comparable to doubling `swiper' startup time with `visual-line-mode'.
Re #291
---
swiper.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/swiper.el b/swiper.el
index eec7434..b9722d4 100644
--- a/swiper.el
+++ b/swiper.el
@@ -343,8 +343,8 @@ When non-nil, INITIAL-INPUT is the initial search pattern."
(preselect
(if (bound-and-true-p visual-line-mode)
(concat " " (buffer-substring-no-properties
- (line-beginning-position)
- (line-end-position)))
+ (save-excursion (beginning-of-visual-line) (point))
+ (save-excursion (end-of-visual-line) (point))))
(1- (line-number-at-pos))))
(minibuffer-allow-text-properties t))
(unwind-protect
- [elpa] master 660e293 106/167: Allow counsel-git-grep -> ivy-occur -> wgrep, (continued)
- [elpa] master 660e293 106/167: Allow counsel-git-grep -> ivy-occur -> wgrep, Oleh Krehel, 2015/12/08
- [elpa] master 044307d 116/167: ivy.el (ivy--sort-files-by-date): Fix due to destructive cl-sort, Oleh Krehel, 2015/12/08
- [elpa] master 6666cf8 099/167: Fix directory validity check, Oleh Krehel, 2015/12/08
- [elpa] master d434071 120/167: swiper.el (swiper-all): New command to swiper all file buffers, Oleh Krehel, 2015/12/08
- [elpa] master b39e20c 102/167: ivy.el (ivy-alt-done): Ensure the trailing slash for directories, Oleh Krehel, 2015/12/08
- [elpa] master d89abf2 104/167: counsel.el (counsel--find-symbol): Silence byte compiler, Oleh Krehel, 2015/12/08
- [elpa] master c4562e0 109/167: swiper.el (swiper-font-lock-ensure): Add occur-mode, Oleh Krehel, 2015/12/08
- [elpa] master 5d90542 112/167: ivy.el (ivy-sort-functions-alist): Update doc, Oleh Krehel, 2015/12/08
- [elpa] master adac116 126/167: Make ivy-completing-read handle history as cons, Oleh Krehel, 2015/12/08
- [elpa] master c580fe9 108/167: ivy.el (ivy-occur): Give full counsel-git-grep cands, Oleh Krehel, 2015/12/08
- [elpa] master bb68b67 122/167: Intermediate fix for :preselect with visual-line-mode,
Oleh Krehel <=
- [elpa] master 5751119 124/167: README.md: Add more bindings, Oleh Krehel, 2015/12/08
- [elpa] master e47ec14 128/167: ivy.el (ivy-completing-read): Fix off by one, Oleh Krehel, 2015/12/08
- [elpa] master d5489af 100/167: doc/ivy.org: Start writing a manual, Oleh Krehel, 2015/12/08
- [elpa] master c4c1878 121/167: Fix swiper preselect issue with similar or identical lines, Oleh Krehel, 2015/12/08
- [elpa] master 7397bec 114/167: Allow user-specified matched candidate sorting, Oleh Krehel, 2015/12/08
- [elpa] master ce557d1 119/167: swiper.el (swiper--candidates): Replace "\t" with " ", Oleh Krehel, 2015/12/08
- [elpa] master 5a99dda 118/167: ivy.el (ivy--truncate-string): New defun, Oleh Krehel, 2015/12/08
- [elpa] master 3101efd 136/167: swiper.el (swiper--action): push-mark only if exited the minibuffer, Oleh Krehel, 2015/12/08
- [elpa] master 63f3498 123/167: Add precise preselect for swiper with visual-line-mode, Oleh Krehel, 2015/12/08
- [elpa] master 74bb138 144/167: Update ivy format functions., Oleh Krehel, 2015/12/08