Track pixel mouse terminal mode
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s
ci / test (push) Canceled after 0s
ci / fuzz-smoke (push) Canceled after 0s
ci / macos-client (macos-aarch64, macos-14) (push) Canceled after 0s
ci / macos-client (macos-x86_64, macos-13) (push) Canceled after 0s
ci / windows-client (push) Canceled after 0s
ci / package-release (linux-x86_64, ubuntu-latest, , , ) (push) Canceled after 0s
ci / package-release (macos-aarch64, macos-14, , , ) (push) Canceled after 0s
ci / package-release (macos-x86_64, macos-13, , , ) (push) Canceled after 0s
ci / package-release (windows-aarch64, windows-latest, aarch64, windows, aarch64-pc-windows-msvc) (push) Canceled after 0s
ci / package-release (windows-x86_64, windows-latest, , , ) (push) Canceled after 0s
ci / remote-bench (push) Canceled after 0s
ci / publish-gitea-release (push) Canceled after 0s
This commit is contained in:
+30
-6
@@ -9403,7 +9403,7 @@ fn terminal_private_params_include_mouse_tracking(params: &[u8]) -> bool {
|
||||
.any(|param| {
|
||||
matches!(
|
||||
param,
|
||||
b"1000" | b"1001" | b"1002" | b"1003" | b"1005" | b"1006" | b"1015"
|
||||
b"1000" | b"1001" | b"1002" | b"1003" | b"1005" | b"1006" | b"1015" | b"1016"
|
||||
)
|
||||
})
|
||||
}
|
||||
@@ -10191,6 +10191,7 @@ const TERMINAL_SNAPSHOT_RESET: &[u8] = concat!(
|
||||
"\x1b[?1000l",
|
||||
"\x1b[?1004l",
|
||||
"\x1b[?1015l",
|
||||
"\x1b[?1016l",
|
||||
"\x1b[?1006l",
|
||||
"\x1b[?1005l",
|
||||
"\x1b[?2004l",
|
||||
@@ -10591,6 +10592,7 @@ const TERMINAL_CLEANUP: &[u8] = concat!(
|
||||
"\x1b[?1000l",
|
||||
"\x1b[?1004l",
|
||||
"\x1b[?1015l",
|
||||
"\x1b[?1016l",
|
||||
"\x1b[?1006l",
|
||||
"\x1b[?1005l",
|
||||
"\x1b[?2004l",
|
||||
@@ -10610,11 +10612,12 @@ mod tests {
|
||||
PendingStreamControl, PendingStreamOpen, PendingWindowAdjust, PredictMode, Predictor,
|
||||
RESTART_STATUS_SCRIPT, RemoteForward, STALE_TERMINAL_INPUT_AFTER, STARTUP_INPUT_HOLD,
|
||||
STREAM_CONTROL_RETRANSMIT_MAX_ATTEMPTS, STREAM_INITIAL_WINDOW, SshConfig,
|
||||
SshPathTokenContext, StartupGateMode, StatusAction, TERMINAL_SNAPSHOT_RESET, UpdateOptions,
|
||||
UpdateRole, auth_allows, cache_key, cache_server_prefix, cleanup_stream_state,
|
||||
clear_cached_credentials, effective_update_artifact_tag, ensure_tui_safe_status_overlay,
|
||||
expand_ssh_path_tokens, first_resolved_addr, input_contains_focus_in, input_matches_escape,
|
||||
is_local_status_target, is_resume_response_for_client, latest_release_download_url,
|
||||
SshPathTokenContext, StartupGateMode, StatusAction, TERMINAL_CLEANUP,
|
||||
TERMINAL_SNAPSHOT_RESET, UpdateOptions, UpdateRole, auth_allows, cache_key,
|
||||
cache_server_prefix, cleanup_stream_state, clear_cached_credentials,
|
||||
effective_update_artifact_tag, ensure_tui_safe_status_overlay, expand_ssh_path_tokens,
|
||||
first_resolved_addr, input_contains_focus_in, input_matches_escape, is_local_status_target,
|
||||
is_resume_response_for_client, latest_release_download_url,
|
||||
load_first_native_identity_with_prompt, local_symlink_target_is_dir,
|
||||
local_username_from_env, native_proxy_udp_warning, newest_client_trace_path_from,
|
||||
parse_dynamic_forward, parse_escape_key, parse_local_forward, parse_remote_forward,
|
||||
@@ -11661,6 +11664,27 @@ mod tests {
|
||||
assert!(predictor.mouse_tracking);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn predictor_tracks_pixel_mouse_mode() {
|
||||
let mut predictor = Predictor::new(true);
|
||||
|
||||
predictor.observe_output(b"\x1b[?1016h");
|
||||
assert!(predictor.mouse_tracking);
|
||||
|
||||
predictor.observe_output(b"\x1b[?1016l");
|
||||
assert!(!predictor.mouse_tracking);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn terminal_resets_disable_pixel_mouse_mode() {
|
||||
assert!(
|
||||
TERMINAL_SNAPSHOT_RESET
|
||||
.windows(8)
|
||||
.any(|w| w == b"\x1b[?1016l")
|
||||
);
|
||||
assert!(TERMINAL_CLEANUP.windows(8).any(|w| w == b"\x1b[?1016l"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn unowned_mouse_reports_are_stripped_unless_tui_owns_mouse() {
|
||||
assert!(should_strip_unowned_terminal_reports(false, false));
|
||||
|
||||
Reference in New Issue
Block a user