diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-03-21 22:16:02 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2019-03-21 22:16:02 +0100 |
commit | 273910d36cf0feab6081c7cebbada1e6df2f685f (patch) | |
tree | 01cb524a8655abc5c32ddb88d4082ba08841ab53 | |
parent | 64f36561ef53d2992bd6d16b42dab1684f7f6a59 (diff) | |
parent | 0ff705fac71c0e7f20c0c7b41fd7ea2a546bf477 (diff) | |
download | org-mode-273910d36cf0feab6081c7cebbada1e6df2f685f.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org-colview.el | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/lisp/org-colview.el b/lisp/org-colview.el index bc15943..d52e553 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -485,13 +485,15 @@ for the duration of the command.") (defun org-columns-hscroll-title () "Set the `header-line-format' so that it scrolls along with the table." (sit-for .0001) ; need to force a redisplay to update window-hscroll - (when (not (= (window-hscroll) org-columns-previous-hscroll)) - (setq header-line-format - (concat (substring org-columns-full-header-line-format 0 1) - (substring org-columns-full-header-line-format - (1+ (window-hscroll)))) - org-columns-previous-hscroll (window-hscroll)) - (force-mode-line-update))) + (let ((hscroll (window-hscroll))) + (when (/= org-columns-previous-hscroll hscroll) + (setq header-line-format + (concat (substring org-columns-full-header-line-format 0 1) + (substring org-columns-full-header-line-format + (min (length org-columns-full-header-line-format) + (1+ hscroll)))) + org-columns-previous-hscroll hscroll) + (force-mode-line-update)))) (defvar org-colview-initial-truncate-line-value nil "Remember the value of `truncate-lines' across colview.") |