4bff0a
From a064e883c7cc28b8d561a7fea56b139d8e7d2286 Mon Sep 17 00:00:00 2001
4bff0a
From: Lennart Poettering <lennart@poettering.net>
4bff0a
Date: Mon, 3 Dec 2018 21:39:39 +0100
4bff0a
Subject: [PATCH] format-table: never try to reuse cells that have
4bff0a
 color/url/uppercase set
4bff0a
4bff0a
The table cell reusing code is supposed to be an internal memory
4bff0a
optimization, and not more. This means behaviour should be the same as
4bff0a
if we wouldn't reuse cells.
4bff0a
4bff0a
(cherry picked from commit 94a80afed42a8b36d69a229bf44ba690f8f59a78)
4bff0a
4bff0a
Related: #1689832
4bff0a
---
4bff0a
 src/basic/format-table.c | 8 ++++++++
4bff0a
 1 file changed, 8 insertions(+)
4bff0a
4bff0a
diff --git a/src/basic/format-table.c b/src/basic/format-table.c
4bff0a
index fe2201ee5f..844b92f41c 100644
4bff0a
--- a/src/basic/format-table.c
4bff0a
+++ b/src/basic/format-table.c
4bff0a
@@ -286,6 +286,14 @@ static bool table_data_matches(
4bff0a
         if (d->ellipsize_percent != ellipsize_percent)
4bff0a
                 return false;
4bff0a
 
4bff0a
+        /* If a color/url/uppercase flag is set, refuse to merge */
4bff0a
+        if (d->color)
4bff0a
+                return false;
4bff0a
+        if (d->url)
4bff0a
+                return false;
4bff0a
+        if (d->uppercase)
4bff0a
+                return false;
4bff0a
+
4bff0a
         k = table_data_size(type, data);
4bff0a
         l = table_data_size(d->type, d->data);
4bff0a