commit 5aa1ba3efe0597a5f508b8220961c75c3359ccdb
parent 1d63a057a6cb47e84c204f64ba5406cfe7a3ab93
Author: Jaehwang Jung <tomtomjhj@gmail.com>
Date: Thu, 14 Dec 2023 07:16:21 +0900
fix(defaults): background detection in tmux (#26557)
Wrap the query with passthrough sequence
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/runtime/lua/vim/_defaults.lua b/runtime/lua/vim/_defaults.lua
@@ -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