]> code.delx.au - gnu-emacs-elpa/commit
Intermediate fix for :preselect with visual-line-mode
authorOleh Krehel <ohwoeowho@gmail.com>
Mon, 16 Nov 2015 11:50:42 +0000 (12:50 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Mon, 16 Nov 2015 11:54:04 +0000 (12:54 +0100)
commitbb68b67b2bc6f95ddf667e4c34eb2902bcbf604b
tree857f4b3cc5a4139b7c994d9f5da59243e644b53d
parentc4c1878580eddb229cae98b7d02b5804c9bcc330
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