summary refs log tree commit diff
path: root/Functions/Zle
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-09-08 16:32:44 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-09-08 16:32:44 +0000
commit154b7351f4b246077ef03217f33b11de27c350f9 (patch)
treebe6f07952bcfbb4331f87bbc8f659f5d88c55207 /Functions/Zle
parent82b6ee09bcf4d6ac45af226dc4a0243974f18db1 (diff)
downloadzsh-154b7351f4b246077ef03217f33b11de27c350f9.tar.gz
zsh-154b7351f4b246077ef03217f33b11de27c350f9.tar.xz
zsh-154b7351f4b246077ef03217f33b11de27c350f9.zip
unposted: safety on regexp errors in replace-string-again
Diffstat (limited to 'Functions/Zle')
-rw-r--r--Functions/Zle/replace-string-again4
1 files changed, 2 insertions, 2 deletions
diff --git a/Functions/Zle/replace-string-again b/Functions/Zle/replace-string-again
index 83a24167e..f24c14f88 100644
--- a/Functions/Zle/replace-string-again
+++ b/Functions/Zle/replace-string-again
@@ -40,8 +40,8 @@ if [[ $curwidget = *(pattern|regex)* ]]; then
     rep2+=$rep
     if [[ $curwidget = *regex* ]]; then
       autoload -Uz regexp-replace
-      regexp-replace LBUFFER $_replace_string_src $rep2
-      regexp-replace RBUFFER $_replace_string_src $rep2
+      regexp-replace LBUFFER $_replace_string_src $rep2 || return 1
+      regexp-replace RBUFFER $_replace_string_src $rep2 || return 1
     else
       LBUFFER=${LBUFFER//(#bm)$~_replace_string_src/${(e)rep2}}
       RBUFFER=${RBUFFER//(#bm)$~_replace_string_src/${(e)rep2}}