summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Savage <nick@nicksavage.ca>2021-05-01 20:05:09 -0400
committerBastien <bzg@gnu.org>2021-05-02 19:21:26 +0200
commitcb0ef12801f73e43089f6d92bd90a0bab34b15a0 (patch)
treeb2782703ae1e6a6ac02f3017e5ed6e9c81c91411
parentab82d6ae254666ffe605234d4f512ebdd37a9c0c (diff)
downloadorg-mode-cb0ef12801f73e43089f6d92bd90a0bab34b15a0.tar.gz
lisp/org-colview.el: Update org-columns to respect global-visual-line-mode
* lisp/org-colview.el (org-columns): Prevent enabling `truncate-lines' when `global-visual-line-mode' is enabled. This fixes a bug where `org-columns' overlays were disabling wrapping of lines when `global-visual-line-mode` was already activated, and so therefore expectation was that the lines would continue wrapping. This is because `org-columns' was setting truncate-lines to t, when global-visual-line-mode requires it to be set to nil. The interaction between the two caused the wrapping not to occur.
-rw-r--r--lisp/org-colview.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 517bcdf..9dad8c7 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -879,7 +879,8 @@ When COLUMNS-FMT-STRING is non-nil, use it as the column format."
(unless (local-variable-p 'org-colview-initial-truncate-line-value)
(setq-local org-colview-initial-truncate-line-value
truncate-lines))
- (setq truncate-lines t)
+ (if (not global-visual-line-mode)
+ (setq truncate-lines t))
(dolist (entry cache)
(goto-char (car entry))
(org-columns--display-here (cdr entry)))))))))