* Add a CloseWithoutClear copy mode key assignment
Closing the copy overlay currently unconditionally clears the viewport,
in particular resetting scroll. For the search overlay, we don't
necessarily want to scroll back to the prompt after finding a match --
indeed, the old search overlay (which didn't use copy mode) had this
behaviour.
Add a CloseWithoutClear key assignment which has this desired behaviour,
and make it the default for ESC in search mode.
* Change CloseWithoutClear into normal Close, and add ResetViewport
* Remove ResetViewport, add helper for keys
Otherwise it is just hidden forever. We can't use the proper declarative
interface, because we are faking quite some stuff for "-e", so instead
we mention it explicitly in the help output.
This is done for compatibility, as many tools assume that running a
command with "$TERMINAL -e $COMMAND" blocks until the command is
finished.
For example some tools delete a needed file after the command returns.
But since we always return immediately (in case --always-new-process is
not provided and if another wezterm instance is already running), this
would mean that the file is deleted before the command could do
anything.
Fixes#4523
This is primarily to improve the chances of displaying an arbitrary
image without resorting to additional external tools, that may be
difficult or impossible to install.
refs: #3716
refs: #3264