f2b915c56741c846e845b037e9fdeb7c3f063bc3

Author
jaseg <s@jaseg.de>
Committer
jaseg <s@jaseg.de>
Date

Message

The safe-paste plugin now works with tmux, too

Diff

 1diff --git a/plugins/safe-paste/safe-paste.plugin.zsh b/plugins/safe-paste/safe-paste.plugin.zsh
 2index 0aa97965fc65a15a7871273d45d10b4dacff4429..17c212c196a264ab53377ec1118f37135ffde0fe 100644
 3--- a/plugins/safe-paste/safe-paste.plugin.zsh
 4+++ b/plugins/safe-paste/safe-paste.plugin.zsh
 5@@ -43,12 +43,12 @@ function _paste_insert() {
 6 
 7 function _zle_line_init() {
 8   # Tell terminal to send escape codes around pastes.
 9-  [[ $TERM == rxvt-unicode || $TERM == xterm || $TERM = xterm-256color ]] && printf '\e[?2004h'
10+  [[ $TERM == rxvt-unicode || $TERM == xterm || $TERM = xterm-256color || $TERM = screen || $TERM = screen-256color ]] && printf '\e[?2004h'
11 }
12 
13 function _zle_line_finish() {
14   # Tell it to stop when we leave zle, so pasting in other programs
15   # doesn't get the ^[[200~ codes around the pasted text.
16-  [[ $TERM == rxvt-unicode || $TERM == xterm || $TERM = xterm-256color ]] && printf '\e[?2004l'
17+  [[ $TERM == rxvt-unicode || $TERM == xterm || $TERM = xterm-256color || $TERM = screen || $TERM = screen-256color ]] && printf '\e[?2004l'
18 }
19