mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-15 02:49:33 +01:00
fix(terminal): a remote shell load keeps the remote scrollback (#601/#602 integration)
A remote session's local pane hosts the remote tmux client, so it is always in the alternate screen. #601's alt=recording fallback therefore threw away the scrollback #602 had just spliced in from the remote tmux on every remote shell load. The fallback now applies only when no remote scrollback was read (the read failed, or the session is not remote). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
d571c41fb1
commit
f78b820302
2 files changed
+32
-2
No files matched your search
@@ -3153,8 +3153,16 @@ export function registerSessionRoutes(
|
||||
// `alt=recording`) gets the old visible-frame load over it, tailed, rather
|
||||
// than losing everything above the screen. `alternate_on` cannot tell a
|
||||
// nested tmux from vim or less, so those take this path too while open:
|
||||
// the load the shell had before tmux-rendered loads existed.
|
||||
if (isFullReload && query.alt === 'recording' && captureOpts.capturedAlternateOn === true) {
|
||||
// the load the shell had before tmux-rendered loads existed. Not when the
|
||||
// history came from the remote tmux (`scrollbackOverride`): a remote pane is
|
||||
// in the alternate screen only because it hosts that tmux's client, and
|
||||
// the fallback would throw the remote scrollback away.
|
||||
if (
|
||||
isFullReload &&
|
||||
query.alt === 'recording' &&
|
||||
captureOpts.scrollbackOverride === undefined &&
|
||||
captureOpts.capturedAlternateOn === true
|
||||
) {
|
||||
isFullReload = false;
|
||||
captureOpts = {};
|
||||
liveMuxBuffer = capture(captureOpts);
|
||||
|
||||
Reference in new issue
Block a user