about summary refs log tree commit diff
path: root/Src/Zle
diff options
context:
space:
mode:
authorWayne Davison <wayned@users.sourceforge.net>2005-12-12 18:22:08 +0000
committerWayne Davison <wayned@users.sourceforge.net>2005-12-12 18:22:08 +0000
commite0c9faba4df38b0000b3c1f2a5d88ba723adea86 (patch)
treeb5883d823a2dadc12bc94f7fe85ade7ec991d1d9 /Src/Zle
parent00e0c063ac23634fdbb0473a5f55c0738bc6bda9 (diff)
downloadzsh-e0c9faba4df38b0000b3c1f2a5d88ba723adea86.tar.gz
zsh-e0c9faba4df38b0000b3c1f2a5d88ba723adea86.tar.xz
zsh-e0c9faba4df38b0000b3c1f2a5d88ba723adea86.zip
Fixed problem in zle_setline() where moving to an empty line would
set zlecs to -1. (Reported by Jun T.)
Diffstat (limited to 'Src/Zle')
-rw-r--r--Src/Zle/zle_hist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c
index a26aee764..a61f7f59e 100644
--- a/Src/Zle/zle_hist.c
+++ b/Src/Zle/zle_hist.c
@@ -670,7 +670,7 @@ zle_setline(Histent he)
 	ZS_memcpy(zleline, he->zle_text, zlell);
 
 	zlecs = zlell;
-	if (invicmdmode())
+	if (zlecs > findbol() && invicmdmode())
 	    zlecs--;
     } else {
 	setline(he->text, ZSL_COPY|ZSL_TOEND);