* swiper.el (swiper--candidates): Under a specific random condition,
(line-move 1) from the beginning of line doesn't move to the beginning
of the next visual line.
This change fixes it, but will result in an even slower startup when
`visual-line-mode' is active.
Fixes #313
" "
(replace-regexp-in-string
"\t" " "
- (buffer-substring
- (point)
- (if swiper-use-visual-line
+ (if swiper-use-visual-line
+ (buffer-substring
(save-excursion
- (end-of-visual-line)
+ (beginning-of-visual-line)
(point))
+ (save-excursion
+ (end-of-visual-line)
+ (point)))
+ (buffer-substring
+ (point)
(line-end-position)))))))
(when (eq major-mode 'twittering-mode)
(remove-text-properties 0 (length str) '(field) str))