GNOME Bugzilla – Bug 673663
search/replace destroys formatting
Last modified: 2018-05-22 13:50:03 UTC
new gnumeric A1: 123 U+00E4 456 (this shows as "123ä456") A2: 123a U+0308 456 (this also shows as "123ä456") in both cases select ä and format it with an underline search/replace: a -> x note that the a in both cases is being replaced by x but its underlining disappears.
Suffering and pain! I imagine that if you added more digits and made "5" bold, the boldness would move.
This may not be a normalization issue, since I can't make the formatting move. It always disappears.
indeed even with only ASCII characters the formatting disappears....
I don't even see how we can fix this. We have three steps right now 1: normalization 2: search-and-replace 3: re-normalization Currently none of the steps track attributes. Make step 2 do so is a simple matter of enough programming. 1 and 3, however, I don't see how we can handle. We have no glib support for mapping normalized bytes to their source.
For normalization we could possibly: input: pango attributes + text -- convert to text with pango-markup -- normalize -- convert back to pango attributes + text of course we would only do that after we have checked first that search/replace applies.
Such a conversion would probably work although we would have to deal with the case of normalization affecting the pango markup. I wonder what gedit does. --> low priority: this hasn't worked for a decade and no-one cared enough to report it.
A decade ago we did not have in cell rich text (text formatting applied only to whole cells). So the problem did not exist then. But of course it has been years since we introduced it.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/184.