1
mirror of https://github.com/neovim/neovim.git synced 2024-12-28 14:31:13 -07:00

fix(termcap): escape escapes in passthrough sequence ()

When using the tmux passthrough sequence any escape characters in the
inner sequence must be escaped by adding another escape character.
This commit is contained in:
Gregory Anders 2023-11-29 09:49:44 -06:00 committed by GitHub
parent 9b4b23493d
commit 400b7842a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -53,7 +53,7 @@ function M.query(caps, cb)
-- If running in tmux, wrap with the passthrough sequence
if os.getenv('TMUX') then
query = string.format('\027Ptmux;\027%s\027\\', query)
query = string.format('\027Ptmux;%s\027\\', query:gsub('\027', '\027\027'))
end
io.stdout:write(query)