diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-02-22 21:15:56 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-22 21:15:56 +0800 |
commit | eef2aedff6313d85b852463c78614ace57bb6f56 (patch) | |
tree | 6ce67ed300295d4f02522a5ff4eac285e4a88971 /runtime/lua/vim/_defaults.lua | |
parent | 741a6684e0c881bbad72d8235ad55f55282da0ef (diff) | |
download | rneovim-eef2aedff6313d85b852463c78614ace57bb6f56.tar.gz rneovim-eef2aedff6313d85b852463c78614ace57bb6f56.tar.bz2 rneovim-eef2aedff6313d85b852463c78614ace57bb6f56.zip |
fix(defaults): remove tmux background detection passthrough (#27571)
There is now a new tmux 3.4 release that queries background color from
the parent terminal if background is not set in tmux, so removing the
passthrough still works when background is not set in tmux, and fixes
the incorrect detection when background is set in tmux.
Diffstat (limited to 'runtime/lua/vim/_defaults.lua')
-rw-r--r-- | runtime/lua/vim/_defaults.lua | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/runtime/lua/vim/_defaults.lua b/runtime/lua/vim/_defaults.lua index 07850a5a47..f453264c76 100644 --- a/runtime/lua/vim/_defaults.lua +++ b/runtime/lua/vim/_defaults.lua @@ -343,17 +343,7 @@ if tty then end, }) - local query = '\027]11;?\007' - - -- tmux 3.3a and earlier do not query the parent terminal for background color. As of the - -- writing of this comment, 3.3a is the latest release, so a passthrough sequence is necessary. - -- The passthrough should be removed as soon as a tmux version later than 3.3a is released. - -- See: https://github.com/neovim/neovim/pull/26557 - if os.getenv('TMUX') then - query = string.format('\027Ptmux;%s\027\\', query:gsub('\027', '\027\027')) - end - - io.stdout:write(query) + io.stdout:write('\027]11;?\007') timer:start(1000, 0, function() -- Delete the autocommand if no response was received |