aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMark Walters <markwalters1009@gmail.com>2013-06-10 05:57:13 +0100
committerDavid Bremner <bremner@debian.org>2013-06-13 00:07:19 +0900
commitd0bd88f06db6a7a83f6fb5477f293f7d80db14c7 (patch)
treefa2a718be6b6b09ddd68eb0770636741fd4d5a35 /lib
parent055f7621d649021b354fabea90f55136b55bf6ef (diff)
emacs: show: implement lazy hidden part handling
This adds the actual code to do the lazy insertion of hidden parts. We use a memory inefficient but simple method: when we come to insert the part if it is hidden we just store all of the arguments to the part insertion function as a button property. This means when we want to show the part we can just resume where we left off. One thing is that we can't tell if a lazy part will produce text until we try to render it so when unhiding a part we check to see if it rendered; if not we invoke the default part handler (e.g. an external viewer). Also, we would like to insert the lazy part at the start of the line after the part button. But if this line has some text properties (e.g. the colours for a following message header) then the lazy part gets these properties. Thus we start at the end of the part button line, insert a newline, insert the lazy part, and then delete the extra newline at the end of the part.
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions