]> code.delx.au - gnu-emacs-elpa/commitdiff
Don't shorten selector string for visual-line-mode and bolp
authorOleh Krehel <ohwoeowho@gmail.com>
Wed, 6 Jan 2016 09:36:33 +0000 (10:36 +0100)
committerOleh Krehel <ohwoeowho@gmail.com>
Wed, 6 Jan 2016 09:36:33 +0000 (10:36 +0100)
* avy.el (avy--overlay-at-full): When at an empty line, there's plenty
  of space to display the full selector. No need to truncate it to avoid
  visual-line-mode reformatting the buffer text.

Fixes #129

avy.el

diff --git a/avy.el b/avy.el
index a6e4c0b1371c89a019a28a589194098ee51adb7c..7af1de80ca676796a99dee124fd62ae9549d663b 100644 (file)
--- a/avy.el
+++ b/avy.el
@@ -771,7 +771,8 @@ LEAF is normally ((BEG . END) . WND)."
                                 len))
                            lep)))
           (when (and (bound-and-true-p visual-line-mode)
-                     (> len (- end beg)))
+                     (> len (- end beg))
+                     (not (eq lep beg)))
             (setq len (- end beg))
             (let ((old-str (apply #'string (reverse path))))
               (setq str