aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-11-13 07:27:45 +0800
committerGitHub <noreply@github.com>2023-11-13 07:27:45 +0800
commitd2983dcdb1ca003b5fd42d7d99fd98310aa1cd56 (patch)
tree9385dc597953fba694ff9b6ab660f7f07cdc0a5c
parentd65c574ca31b452fe5538e1aebf288fd4b7290dd (diff)
downloadrneovim-d2983dcdb1ca003b5fd42d7d99fd98310aa1cd56.tar.gz
rneovim-d2983dcdb1ca003b5fd42d7d99fd98310aa1cd56.tar.bz2
rneovim-d2983dcdb1ca003b5fd42d7d99fd98310aa1cd56.zip
fix(clipboard): make osc52 work with PUC Lua (#26014)
-rw-r--r--runtime/lua/vim/clipboard/osc52.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/clipboard/osc52.lua b/runtime/lua/vim/clipboard/osc52.lua
index 78f5754c30..035a6abb86 100644
--- a/runtime/lua/vim/clipboard/osc52.lua
+++ b/runtime/lua/vim/clipboard/osc52.lua
@@ -2,7 +2,7 @@ local M = {}
function M.copy(lines)
local s = table.concat(lines, '\n')
- io.stdout:write(string.format('\x1b]52;;%s\x1b\\', vim.base64.encode(s)))
+ io.stdout:write(string.format('\027]52;;%s\027\\', vim.base64.encode(s)))
end
function M.paste()
@@ -10,7 +10,7 @@ function M.paste()
local id = vim.api.nvim_create_autocmd('TermResponse', {
callback = function(args)
local resp = args.data ---@type string
- local encoded = resp:match('\x1b%]52;%w?;([A-Za-z0-9+/=]*)')
+ local encoded = resp:match('\027%]52;%w?;([A-Za-z0-9+/=]*)')
if encoded then
contents = vim.base64.decode(encoded)
return true
@@ -18,7 +18,7 @@ function M.paste()
end,
})
- io.stdout:write('\x1b]52;;?\x1b\\')
+ io.stdout:write('\027]52;;?\027\\')
local ok, res