Support newer tmux versions

First, it should not break anything: according to tmux's ChangeLog, then tmux
support for bracketed-paste mode dates back to 1.7.

Then, on my (tmux 2.1) system, WrapForTmux actually makes the char codes be
ignored, and a tmux error file is written. I couldn't find a trace in tmux's
ChangeLog as to when this occured, and so went with switching on the major tmux
version.
This commit is contained in:
Léo Gaspard 2016-02-17 03:06:01 +01:00
parent 148df8cb26
commit 475f337b5f
No known key found for this signature in database
GPG Key ID: 8A55848B6090F9CF

View File

@ -14,7 +14,7 @@ if !exists("g:bracketed_paste_tmux_wrap")
endif
function! WrapForTmux(s)
if !g:bracketed_paste_tmux_wrap || !exists('$TMUX')
if !g:bracketed_paste_tmux_wrap || !exists('$TMUX') || system('tmux -V')[5] >= '2'
return a:s
endif