fix(defaults): background detection in tmux (#26557)

Wrap the query with passthrough sequence
This commit is contained in:
Jaehwang Jung 2023-12-14 07:16:21 +09:00 committed by GitHub
parent 1d63a057a6
commit 5aa1ba3efe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -298,7 +298,11 @@ if tty then
end,
})
io.stdout:write('\027]11;?\007')
local query = '\027]11;?\007'
if os.getenv('TMUX') then
query = string.format('\027Ptmux;%s\027\\', query:gsub('\027', '\027\027'))
end
io.stdout:write(query)
timer:start(1000, 0, function()
-- Delete the autocommand if no response was received