Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
568a977d
Commit
568a977d
authored
Oct 13, 2020
by
Marc Cornellà
Browse files
safe-paste: fix _bracketed_paste_zle_init/finish error
Fixes #9337
parent
a39bee8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
plugins/safe-paste/safe-paste.plugin.zsh
View file @
568a977d
...
...
@@ -84,7 +84,7 @@ _bracketed_paste_enqueue() {
_bracketed_paste_zle_init
()
{
_bracketed_paste_content
=
''
# Tell terminal to send escape codes around pastes
if
[
$TERM
=
~
'^(rxvt-unicode|xterm(-256color)?|screen(-256color)?)$'
]
;
then
if
[
[
$TERM
=
~
'^(rxvt-unicode|xterm(-256color)?|screen(-256color)?)$'
]
]
;
then
printf
'\e[?2004h'
fi
}
...
...
@@ -93,7 +93,7 @@ _bracketed_paste_zle_init() {
_bracketed_paste_zle_finish
()
{
# Turn off bracketed paste when we leave ZLE, so pasting in other programs
# doesn't get the ^[[200~ codes around the pasted text
if
[
$TERM
=
~
'^(rxvt-unicode|xterm(-256color)?|screen(-256color)?)$'
]
;
then
if
[
[
$TERM
=
~
'^(rxvt-unicode|xterm(-256color)?|screen(-256color)?)$'
]
]
;
then
printf
'\e[?2004l'
fi
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment