chiark / gitweb /
Stop activity states loitering in initial_util.
authorSimon Tatham <anakin@pobox.com>
Thu, 25 Jan 2024 08:38:45 +0000 (08:38 +0000)
committerSimon Tatham <anakin@pobox.com>
Thu, 25 Jan 2024 08:38:45 +0000 (08:38 +0000)
commitddd114efdb6e07054fac12a2823ae828831c5ecd
treea89ac5e9889c98397151acd534b626aa6e75a3bd
parent0d4e2bad8738927d861484eedb3bded42f7f0ec0
Stop activity states loitering in initial_util.

In order to respond to Alt+E by putting a prompt at the bottom of the
current activity (rather than the naïve approach of breaking the
keypress into ESC + E, switching to the utilities menu in response to
the ESC, and then putting the prompt at the bottom of that much less
helpful screen), we remember an activity from the start of the overall
keypress, in the 'initial_util' field of ActivityStack.

But then we _leave_ it there, and don't clean it up - which means it's
returned by ActivityStack::iter(), and hence inhibits garbage
collection of the associated activity state. So a thing could linger
in there for ages despite not actually being on the stack.
src/activity_stack.rs
src/tui.rs