Fix 4: shared-memory

This commit is contained in:
Sebastian authored and Hakan Seven committed 2026-06-25 00:01:36 +03:00
1 parent a93d425002
commit 2b898d6f22
13 files changed
+894 -92

No files matched your search

+8 -3
View File
@@ -35,9 +35,7 @@ pub fn handle_plugin_request(
ReadRecord { handle, app_name } => {
PluginResponse::Record(host.read_record(handle, &app_name).cloned())
}
WriteRecord { handle, record } => {
PluginResponse::Bool(host.write_record(handle, record))
}
WriteRecord { handle, record } => PluginResponse::Bool(host.write_record(handle, record)),
RemoveRecord { handle, app_name } => {
PluginResponse::Bool(host.remove_record(handle, &app_name))
}
@@ -54,5 +52,12 @@ pub fn handle_plugin_request(
PluginResponse::Ok
}
DocumentSnapshot => PluginResponse::Document(host.document().clone()),
OpenDocumentView => match host.document_view() {
Some(info) => PluginResponse::DocumentView {
path: info.path,
version: info.version,
},
None => PluginResponse::Error("shared document view unavailable".to_string()),
},
}
}