From: martin f. krafft Date: Wed, 23 Aug 2023 08:26:09 +0000 (+1200) Subject: buildmimetree.py: make kill-line a constant X-Git-Url: https://git.madduck.net/etc/neomutt.git/commitdiff_plain/1d8aa3a40f19222eaec04dc9ce28242d00bc86e4 buildmimetree.py: make kill-line a constant --- diff --git a/.config/neomutt/buildmimetree.py b/.config/neomutt/buildmimetree.py index f4ee821..3528b06 100755 --- a/.config/neomutt/buildmimetree.py +++ b/.config/neomutt/buildmimetree.py @@ -476,6 +476,8 @@ def do_massage( depth-first, and responsible for telling NeoMutt how to assemble the tree. """ + KILL_LINE=r'\Ca\Ck' + if isinstance(item, Part): # We've hit a leaf-node, i.e. an alternative or a related part # with actual content. @@ -496,7 +498,7 @@ def do_massage( # information, then we might just as well update the NeoMutt # tree now: if item.cid: - cmds.push(f"\\Ca\\Ck{item.cid}") + cmds.push(f"{KILL_LINE}{item.cid}") elif isinstance(item, Multipart): # This node has children, but we already visited them (see @@ -516,7 +518,7 @@ def do_massage( # If the item has a description, we might just as well add it if item.desc: - cmds.push(f"\\Ca\\Ck{item.desc}") + cmds.push(f"{KILL_LINE}{item.desc}") # Finally, if we're at non-root level, tag the new container, # as it might itself be part of a container, to be processed