aboutsummaryrefslogtreecommitdiffstats
path: root/src/savequerydialog.cpp
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-24 20:00:45 +0200
committerDanilo M. <danix@danix.xyz>2026-08-24 20:00:45 +0200
commit86af01996dd702bdc3f837e96f154088e8b45538 (patch)
tree26d236b2780ca08e31f12ad70c9f10c1f6663d29 /src/savequerydialog.cpp
parentbe2534ab60d362b2f685130265f727190ccf867a (diff)
downloadqtmaildir-86af01996dd702bdc3f837e96f154088e8b45538.tar.gz
qtmaildir-86af01996dd702bdc3f837e96f154088e8b45538.zip
feat(signatures): replace an existing signature, guarded by a match
Finding a "-- " delimiter is not authority to delete what follows it. The block is replaced only when its text matches one of the signatures on disk, and otherwise the new one is inserted with nothing removed, so a wrong guess adds a visible duplicate rather than destroying the user's writing. A quoted delimiter is never the signature either: the quoted original carries the other party's, and it is not this message's to replace. The block's lower boundary is quoteStart(), not the first quoted line. The attribution introduces the quote and belongs with it, so scanning for '>' alone swallowed "On Mon, someone wrote:" into the signature block: it then matched no known signature, and had it matched, removal would have stranded the attribution above the text it introduces. The boundary the insertion uses and the boundary the removal uses have to be the same one. The guard's test was mutation-checked by making the match unconditional, which fails it. Part of item 152.
Diffstat (limited to 'src/savequerydialog.cpp')
0 files changed, 0 insertions, 0 deletions