diff options
Diffstat (limited to 'lisp/net')
-rw-r--r-- | lisp/net/shr.el | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/lisp/net/shr.el b/lisp/net/shr.el index a0c9eba4144..f4c765f4d25 100644 --- a/lisp/net/shr.el +++ b/lisp/net/shr.el @@ -1667,11 +1667,17 @@ The preference is a float determined from `shr-prefer-media-type'." ;; remaining columns. (- (length widths) i))) (dotimes (j (1- colspan)) - (if (> (+ i 1 j) (1- (length widths))) - (setq width (aref widths (1- (length widths)))) - (setq width (+ width - shr-table-separator-length - (aref widths (+ i 1 j)))))) + (setq width + (if (> (+ i 1 j) (1- (length widths))) + ;; If we have a colspan spec that's longer + ;; than the table is wide, just use the last + ;; width as the width. + (aref widths (1- (length widths))) + ;; Sum up the widths of the columns we're + ;; spanning. + (+ width + shr-table-separator-length + (aref widths (+ i 1 j)))))) (setq width-column (+ width-column (1- colspan)))) (when (or column (not fill)) |