fix(run): enable tmux mouse mode so the run terminal's scrollbar actually drags
Session panes had a scrollbar track but no way to drag it — wheel/drag events passed straight to the running program instead of entering tmux's copy-mode scrollback. xterm.js already forwards mouse-tracking escapes once tmux advertises them, so turning mouse mode on per-session is enough.
This commit is contained in:
@@ -40,6 +40,11 @@ function hasSession(name) {
|
||||
*/
|
||||
function newSession({ name, cwd, argv }) {
|
||||
execImpl(["new-session", "-d", "-s", name, "-c", cwd, "--", ...argv]);
|
||||
// Without this the pane has no scrollbar/drag scroll at all — wheel events
|
||||
// just pass through to the running program instead of entering tmux's own
|
||||
// copy-mode scrollback. xterm.js forwards tmux's mouse-tracking escapes
|
||||
// automatically once mouse mode is on, so no client-side change is needed.
|
||||
execImpl(["set-option", "-t", name, "mouse", "on"]);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user