Skip to content

Commit

Permalink
fix(termcap): escape escapes in passthrough sequence (#26301)
Browse files Browse the repository at this point in the history
When using the tmux passthrough sequence any escape characters in the
inner sequence must be escaped by adding another escape character.
  • Loading branch information
gpanders committed Nov 29, 2023
1 parent 9b4b234 commit 400b784
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/lua/vim/termcap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 400b784

Please sign in to comment.