aboutsummaryrefslogtreecommitdiff
path: root/src/ansi.rs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2025-11-12 12:00:30 -0700
committerJosh Rahm <rahm@google.com>2025-11-12 12:00:30 -0700
commita91597d03b9d679c652be5b5402bfb8aefbd9fef (patch)
tree42303393d0e5520d624641c9c8e95cba26b210d8 /src/ansi.rs
parent22c7c29c0303398baa71db8798473ee704f9717c (diff)
downloadr-alacritty-vte-rahm-graphics.tar.gz
r-alacritty-vte-rahm-graphics.tar.bz2
r-alacritty-vte-rahm-graphics.zip
Add new OSC 117 that allows executing an extension script.rahm-graphics
Diffstat (limited to 'src/ansi.rs')
-rw-r--r--src/ansi.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ansi.rs b/src/ansi.rs
index 9dfc54f..ab0ca55 100644
--- a/src/ansi.rs
+++ b/src/ansi.rs
@@ -760,6 +760,8 @@ pub trait Handler {
}
debug!("[osc_unhandled]: [{}]", &buf);
}
+ /// Extension to call a specific script with parameters.
+ fn extension_script(&mut self, _params: &Vec<String>) {}
// Set SCP control.
fn set_scp(&mut self, _char_path: ScpCharPath, _update_mode: ScpUpdateMode) {}
@@ -1545,6 +1547,14 @@ where
// Reset text cursor color.
b"112" => self.handler.reset_color(NamedColor::Cursor as usize),
+ b"117" => {
+ let strvec: Vec<String> = params
+ .iter()
+ .map(|&bytes| String::from_utf8_lossy(bytes).to_string())
+ .collect();
+ self.handler.extension_script(&strvec)
+ },
+
_ => unhandled!(),
}
}