docs: clarify shell observation and window-local tab contracts

This commit is contained in:
2026-11-12 20:58:37 +08:00
parent 2d5138c7ad
commit b15d0872d7
4 changed files with 18 additions and 7 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ fn command(program: &str) -> std::process::Command {
cmd
}
/// 取得系统剪贴板的 UTF-8 文本,失败作为可显示错误返回。
// shell/app 处理开发工具粘贴快捷键时调用;失败由工具 input_error 展示,不用空字符串冒充成功。
// shell/app 处理开发工具粘贴快捷键时同步调用;等待 pbpaste 结束后才插入文本,失败由 input_error 展示。
pub fn read() -> Result<String> {
#[cfg(target_os = "macos")]
{
@@ -39,7 +39,7 @@ pub fn read() -> Result<String> {
}
}
/// 将提供的文本交给系统剪贴板命令,不执行文本内容。
// shell/app 的复制与剪切路径调用;只有成功返回后剪切才会删除编辑器中的选中文本。
// shell/app 的复制与剪切快捷键同步调用;仅非空选区才进入这里,成功返回后剪切才删除编辑器选中文本。
pub fn write(value: &str) -> Result<()> {
#[cfg(target_os = "macos")]
{