From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9069 invoked by alias); 22 Jun 2015 01:36:39 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35558 Received: (qmail 10785 invoked from network); 22 Jun 2015 01:36:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=ypd2ReIzjGien3tMXRM3dOwom7uRcm0B9DVOapZifY4=; b=v92izlA7wZFc227cegd6ovVynePCewVhKnNkn4O4nH9Lc+dhBbusRMLlmqoGqd6Kfe 453772+zjosOzy/8TEGnT39CRS/wKAr6pmlzZEOYuGvaGDySzrOhzWSfxqMOYKqRHYZw LxVk3wY9hNPylMiAqTMVMS3UiQtqE+9o+AJcSXRsMT3oIZy9OwJClNAKKHjHa+VNhM/0 v6TQpqpIcIUcYXlERY/kqNkjY6ns8QV5VoYogBr26gZs+V+nWfYCsMDQ8bnE4PnjUSkh 6muhBIbMECLePUup64ecTSklhvn5rC5MGVrvaFVXmiYr5y//SL+YfFz+/etYYZqiczVG 8qAw== X-Received: by 10.152.7.7 with SMTP id f7mr28173127laa.106.1434936995354; Sun, 21 Jun 2015 18:36:35 -0700 (PDT) From: Mikael Magnusson To: zsh-workers@zsh.org Subject: PATCH: narrow-to-region: Use unique parameter names for new feature Date: Mon, 22 Jun 2015 03:36:29 +0200 Message-Id: <1434936989-22728-1-git-send-email-mikachu@gmail.com> X-Mailer: git-send-email 2.4.0 Turns out _ntr_[lr]buffer were already used, so rename these. (Not just for fun, it did actually not work without this change). --- Functions/Zle/narrow-to-region | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Functions/Zle/narrow-to-region b/Functions/Zle/narrow-to-region index c65c80c..8b88da4 100644 --- a/Functions/Zle/narrow-to-region +++ b/Functions/Zle/narrow-to-region @@ -24,7 +24,7 @@ emulate -L zsh setopt extendedglob -local _ntr_lbuffer _ntr_rbuffer +local _ntr_lbuf_return _ntr_rbuf_return local _ntr_predisplay=$PREDISPLAY _ntr_postdisplay=$POSTDISPLAY integer _ntr_start _ntr_end _ntr_swap _ntr_cursor=$CURSOR _ntr_mark=$MARK integer _ntr_stat @@ -34,7 +34,7 @@ local _ntr_nonempty _ntr_save _ntr_restore _ntr_lbuffer _ntr_rbuffer while getopts "l:np:P:r:R:S:" _ntr_opt; do case $_ntr_opt in - (l) _ntr_lbuffer=$OPTARG + (l) _ntr_lbuf_return=$OPTARG ;; (n) _ntr_nonempty=1 ;; @@ -42,7 +42,7 @@ while getopts "l:np:P:r:R:S:" _ntr_opt; do ;; (P) _ntr_posttext=$OPTARG _ntr_useposttext=1 ;; - (r) _ntr_rbuffer=$OPTARG + (r) _ntr_rbuf_return=$OPTARG ;; (R) _ntr_restore=$OPTARG ;; @@ -108,8 +108,8 @@ if [[ -z $_ntr_save && -z $_ntr_restore ]]; then zle recursive-edit _ntr_stat=$? - [[ -n $_ntr_lbuffer ]] && eval "${_ntr_lbuffer}=\${LBUFFER}" - [[ -n $_ntr_rbuffer ]] && eval "${_ntr_rbuffer}=\${RBUFFER}" + [[ -n $_ntr_lbuf_return ]] && eval "${_ntr_lbuf_return}=\${LBUFFER}" + [[ -n $_ntr_rbuf_return ]] && eval "${_ntr_rbuf_return}=\${RBUFFER}" fi if [[ -n $_ntr_restore || -z $_ntr_save ]]; then -- 2.4.0