aboutsummaryrefslogtreecommitdiff
path: root/src/server/terminal_attach.rs
blob: e7a52be5d15726a2c18477546d258be293175d2e (plain)
1
2
3
4
5
6
7
8
9
10
pub(crate) fn paste_payload_for_runtime(
    runtime: &crate::terminal::TerminalRuntime,
    text: &str,
) -> String {
    if runtime.bracketed_paste_enabled() {
        format!("\x1b[200~{text}\x1b[201~")
    } else {
        text.to_owned()
    }
}