summaryrefslogtreecommitdiffstats
path: root/zellij-tile/src
diff options
context:
space:
mode:
authorJae-Heon Ji <32578710+jaeheonji@users.noreply.github.com>2021-11-26 18:44:43 +0900
committerGitHub <noreply@github.com>2021-11-26 10:44:43 +0100
commitc349586d84e63f9c752340246fc5ca7fa538795d (patch)
tree3bbbaf6884bc42ac35354d7bd92f692234bb376c /zellij-tile/src
parentcbae0213db74bd2cc21588760db203948ebb12f5 (diff)
feat: provide the zellij version to plugins (#894)
* feat: add draft of feature * feat(wasm): add plugin API for getting of zellij version * feat(wasm): update feedback * delete unnecessary function
Diffstat (limited to 'zellij-tile/src')
-rw-r--r--zellij-tile/src/shim.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs
index c664d36b0..e3537053c 100644
--- a/zellij-tile/src/shim.rs
+++ b/zellij-tile/src/shim.rs
@@ -27,6 +27,11 @@ pub fn get_plugin_ids() -> PluginIds {
object_from_stdin().unwrap()
}
+pub fn get_zellij_version() -> String {
+ unsafe { host_get_zellij_version() };
+ object_from_stdin().unwrap()
+}
+
// Host Functions
pub fn open_file(path: &Path) {
@@ -66,6 +71,7 @@ extern "C" {
fn host_unsubscribe();
fn host_set_selectable(selectable: i32);
fn host_get_plugin_ids();
+ fn host_get_zellij_version();
fn host_open_file();
fn host_switch_tab_to(tab_idx: u32);
fn host_set_timeout(secs: f64);