Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Use visual line when `visual-line-mode` is active #227
I mostly write text (markdown or LaTeX) with
Would it be possible to use the visual line for matching / displaying when
I'll see what I can do. I rarely use
On the other hand, all it takes is to rewrite
I've never noticed any problems... Perhaps I'm just lucky
AFAIK there are no visual-line equivalents for
(defun visual-line-beginning-position () "Return point at the beginning of the visual line." (save-excursion (beginning-of-visual-line) (point)))
Though I don't know how inefficient that might be.
Unfortunately, the changes seem to make swiper terribly slow, at least when compiling a list of candidates. It takes a long time (several seconds) for the swiper buffer to appear, during which Emacs is at 100% CPU-usage. Profiling the code shows that most of the processing time is spent in
I also tried it with
If you want to try for yourself, you can use this file:
It's long enough to show the problem. Be sure to activate
Seems like supporting
Yes, I was afraid it wouldn't be possible to do something about it...
But would you consider making this an option? Most of the time, the buffers I use visual-line-mode in are rather large, which makes swiper too slow right now.
I know, I'm the one that asked for this in the first place...
added a commit
Oct 4, 2015
I'm afraid that makes things even worse... Granted, the delay is much smaller (there's still a slight delay there, but it would be acceptable) but swiper now finds far fewer occurrences of the search string than are actually there. Here, swiper finds 209 occurrences of
Moreover, scrolling through them in the swiper buffer highlights (visual) lines that do not match the occurrence:
Results are similar when using