aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.toml6
-rw-r--r--src/ansi.rs10
2 files changed, 13 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index 1039801..5572fa8 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
authors = ["Joe Wilm <joe@jwilm.com>", "Christian Duerr <contact@christianduerr.com>"]
-description = "vte fork for the Alacritty's graphics patch"
-repository = "https://github.com/ayosec/vte-graphics"
+description = "vte fork for the Alacritty's graphics patch with Rahm's patches."
+repository = "git@git.josher.dev:r-alacritty-vte.git"
documentation = "https://docs.rs/vte-graphics/"
keywords = ["ansi", "vte", "parser", "terminal"]
categories = ["parsing", "no-std"]
@@ -15,7 +15,7 @@ rust-version = "1.62.1"
[features]
ansi = ["log", "cursor-icon", "bitflags"]
-default = ["std"]
+default = ["std", "ansi"]
std = ["memchr/std"]
serde = ["dep:serde"]
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!(),
}
}