mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-06-14 12:31:25 +00:00
Fix 'min-width' calculation in 'visual-wrap-prefix-mode'
* lisp/visual-wrap.el (visual-wrap--content-prefix): Remove 'min-width' before computing the pixel width to avoid miscalculation (bug#73882).
This commit is contained in:
parent
08f3bc1b8e
commit
81a5beb8af
1 changed files with 6 additions and 3 deletions
|
|
@ -165,6 +165,9 @@ PREFIX was empty."
|
|||
;; first-line prefix.
|
||||
(let ((avg-space (propertize (buffer-substring position (1+ position))
|
||||
'display '(space :width 1))))
|
||||
;; Remove any `min-width' display specs since we'll replace with
|
||||
;; our own later in `visual-wrap--apply-to-line' (bug#73882).
|
||||
(add-display-text-property 0 (length prefix) 'min-width nil prefix)
|
||||
(max (string-width prefix)
|
||||
(ceiling (string-pixel-width prefix (current-buffer))
|
||||
(string-pixel-width avg-space (current-buffer))))))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue