瀏覽代碼

Merge branch 'maint'

Nicolas Goaziou 6 年之前
父節點
當前提交
dee2403754
共有 1 個文件被更改,包括 7 次插入4 次删除
  1. 7 4
      lisp/org-table.el

+ 7 - 4
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