1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2026-01-01 20:11:06 +01:00

Fixed problem in zle_setline() where moving to an empty line would

set zlecs to -1. (Reported by Jun T.)
This commit is contained in:
Wayne Davison 2005-12-12 18:22:08 +00:00
parent 00e0c063ac
commit e0c9faba4d

View file

@ -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);