branch: externals/org
commit 03d17dbf7c0fce552d80274ae7ef360981af4036
Author: Slawomir Grochowski <[email protected]>
Commit: Slawomir Grochowski <[email protected]>

    ; org-colview: Cache column in column update
    
    * lisp/org-colview.el (org-columns-update): Reuse the current text
    column when looking up the column spec and width.
    
    Refactoring: Extract Variable.
    
    No behavior change.
---
 lisp/org-colview.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 4e927c9d2f..efee7cc6e3 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1219,7 +1219,8 @@ With non-nil optional argument UP, move it up."
        (let ((key (overlay-get ov 'org-columns-key)))
         (when (and key (equal key upcase-property) (overlay-start ov))
           (goto-char (overlay-start ov))
-          (let* ((spec (nth (org-current-text-column) 
org-columns-current-fmt-compiled))
+          (let* ((column (org-current-text-column))
+                 (spec (nth column org-columns-current-fmt-compiled))
                  (value
                   (or (cdr (assoc spec
                                   (get-text-property (line-beginning-position)
@@ -1229,7 +1230,7 @@ With non-nil optional argument UP, move it up."
               (let ((displayed-value (org-columns--displayed-value spec value))
                     (cell-format-string (overlay-get ov 'org-columns-format))
                     (width
-                     (aref org-columns-current-maxwidths 
(org-current-text-column))))
+                     (aref org-columns-current-maxwidths column)))
                 (overlay-put ov 'org-columns-value value)
                 (overlay-put ov 'org-columns-value-modified displayed-value)
                 (overlay-put ov 'display

Reply via email to