From 0c0352783fca7e9c56cd5ca8253834fee77c9d59 Mon Sep 17 00:00:00 2001 From: Gregory Anders Date: Wed, 5 Mar 2025 21:28:05 -0600 Subject: fix(tui): remove DCS escaping in tmux (#32723) Per https://github.com/tmux/tmux/issues/4386, tmux does not support DCS responses, even if the initial request was escaped. --- runtime/lua/vim/_defaults.lua | 4 +--- runtime/lua/vim/termcap.lua | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'runtime/lua/vim') diff --git a/runtime/lua/vim/_defaults.lua b/runtime/lua/vim/_defaults.lua index 544b0acbcc..17a8a3f3cc 100644 --- a/runtime/lua/vim/_defaults.lua +++ b/runtime/lua/vim/_defaults.lua @@ -834,9 +834,7 @@ do -- terminal responds to the DECRQSS with the same SGR sequence that we -- sent then the terminal supports truecolor. local decrqss = '\027P$qm\027\\' - if os.getenv('TMUX') then - decrqss = string.format('\027Ptmux;%s\027\\', decrqss:gsub('\027', '\027\027')) - end + -- Reset attributes first, as other code may have set attributes. io.stdout:write(string.format('\027[0m\027[48;2;%d;%d;%dm%s', r, g, b, decrqss)) diff --git a/runtime/lua/vim/termcap.lua b/runtime/lua/vim/termcap.lua index 23666a337a..2789aacb90 100644 --- a/runtime/lua/vim/termcap.lua +++ b/runtime/lua/vim/termcap.lua @@ -71,11 +71,6 @@ function M.query(caps, cb) local query = string.format('\027P+q%s\027\\', table.concat(encoded, ';')) - -- If running in tmux, wrap with the passthrough sequence - 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() -- cgit