From 920d5f0ffbd5aed3cc62b2d54cd14b1e2ee0174a Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Apr 07 2021 22:35:34 +0000 Subject: format-table: never try to reuse cells that have color/url/uppercase set The table cell reusing code is supposed to be an internal memory optimization, and not more. This means behaviour should be the same as if we wouldn't reuse cells. (cherry picked from commit 94a80afed42a8b36d69a229bf44ba690f8f59a78) Related: #1689832 patch_name: 0137-format-table-never-try-to-reuse-cells-that-have-colo.patch present_in_specfile: true location_in_specfile: 137 squash_commits: true --- diff --git a/src/basic/format-table.c b/src/basic/format-table.c index fe2201e..844b92f 100644 --- a/src/basic/format-table.c +++ b/src/basic/format-table.c @@ -286,6 +286,14 @@ static bool table_data_matches( if (d->ellipsize_percent != ellipsize_percent) return false; + /* If a color/url/uppercase flag is set, refuse to merge */ + if (d->color) + return false; + if (d->url) + return false; + if (d->uppercase) + return false; + k = table_data_size(type, data); l = table_data_size(d->type, d->data);