branch: externals-release/org commit c26d301c9caf4f36a3f9f3946d865b0fffe62683 Author: Ihor Radchenko <yanta...@posteo.net> Commit: Ihor Radchenko <yanta...@posteo.net>
org-string-width: Do not modify STRING by side effect * lisp/org-macs.el (org-string-width): Do not modify STRING argument by side effect. Reported-by: libreville <librevi...@riseup.net> Link: https://orgmode.org/list/6e8524bd56546d695751ada1840d8...@riseup.net --- lisp/org-macs.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 2e8e5e09d2..f0fda21bcd 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -1164,6 +1164,7 @@ STRING width. When REFERENCE-FACE is nil, `default' face is used." (org--string-width-1 string) ;; Wrap/line prefix will make `window-text-pixel-size' return too ;; large value including the prefix. + (setq string (copy-sequence string)) ; do not modify STRING object (remove-text-properties 0 (length string) '(wrap-prefix t line-prefix t) string)