about summary refs log tree commit diff
path: root/Functions/Zle/narrow-to-region
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2006-10-02 09:21:47 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2006-10-02 09:21:47 +0000
commit03027f0f5f9fdc14a705672129e59313867d92fe (patch)
tree646c5b30ab423e78f47bc6b828088516dcea4117 /Functions/Zle/narrow-to-region
parent0fbdf5741fbb06688ab6503f464dbeb31a2c70f8 (diff)
downloadzsh-03027f0f5f9fdc14a705672129e59313867d92fe.tar.gz
zsh-03027f0f5f9fdc14a705672129e59313867d92fe.tar.xz
zsh-03027f0f5f9fdc14a705672129e59313867d92fe.zip
22804: Mikael Magnusson: allow zero-length narrow-to-region range
Diffstat (limited to 'Functions/Zle/narrow-to-region')
-rw-r--r--Functions/Zle/narrow-to-region4
1 files changed, 1 insertions, 3 deletions
diff --git a/Functions/Zle/narrow-to-region b/Functions/Zle/narrow-to-region
index 1f8438789..86fd7ac13 100644
--- a/Functions/Zle/narrow-to-region
+++ b/Functions/Zle/narrow-to-region
@@ -68,9 +68,7 @@ if [[ -n $_ntr_save || -z $_ntr_restore ]]; then
     _ntr_end=$CURSOR
   fi
 
-  if (( _ntr_start == _ntr_end )); then
-    return 1
-  elif (( _ntr_start > _ntr_end )); then
+  if (( _ntr_start > _ntr_end )); then
     _ntr_swap=_ntr_start
     _ntr_start=_ntr_end
     _ntr_end=_ntr_swap