summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-19 17:06:41 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2019-02-19 17:06:41 +0100
commitdee24037545625648f5e91f404b9f6110bcf012e (patch)
treee00d29e8b43d7d31a2ec974b89b0a6f8d209bbc8
parent3a106a213c3d654cc98f01b99b135bc12411b197 (diff)
parent6a9e847dec3b7bd00b5451fad14310c17edf022e (diff)
downloadorg-mode-dee24037545625648f5e91f404b9f6110bcf012e.tar.gz
Merge branch 'maint'
-rw-r--r--lisp/org-table.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/org-table.el b/lisp/org-table.el
index c4ad527..b409dd4 100644
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -4020,11 +4020,14 @@ already hidden."
start end (make-string (1+ width) ?-) "")))
((equal contents "") ;no contents to hide
(list
- (let ((w (org-string-width (buffer-substring start end))))
- (if (> width w)
+ (let ((w (org-string-width (buffer-substring start end)))
+ ;; We really want WIDTH + 2 whitespace, to include blanks
+ ;; around fields.
+ (full (+ 2 width)))
+ (if (<= w full)
(org-table--make-shrinking-overlay
- (1- end) end (make-string (- (+ width 2) w) ?\s) "")
- (org-table--make-shrinking-overlay (- end (- w width 1)) end "" "")))))
+ (1- end) end (make-string (- full w) ?\s) "")
+ (org-table--make-shrinking-overlay (- end (- w full) 1) end "" "")))))
(t
;; If the field is not empty, display exactly WIDTH characters.
;; It can mean to partly hide the field, or extend it with virtual