org-columns--truncate-below-width: Fix Emacs 27 compatibility

* lisp/org-colview.el (org-columns--truncate-below-width): Do not use
extra optional arguments that are only available since Emacs 28.
This commit is contained in:
Ihor Radchenko 2023-07-17 12:57:35 +03:00
parent 3007511f3f
commit 5b6268c29e
No known key found for this signature in database
GPG Key ID: 6470762A7DA11D8B
1 changed files with 1 additions and 1 deletions

View File

@ -459,7 +459,7 @@ substring whose `string-width' does not exceed WIDTH."
(declare (side-effect-free t))
(let ((end (min width (length string))) res)
(while (and end (>= end 0))
(let* ((curr (string-width string 0 end))
(let* ((curr (string-width (substring string 0 end)))
(excess (- curr width)))
(if (> excess 0)
(cl-decf end (max 1 (/ excess 2)))