1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-23 17:01:05 +02:00

A slightly more optimal way to fix the zle_setline() bug using

the same zlecs-checking idiom as setline().
This commit is contained in:
Wayne Davison 2005-12-12 18:35:47 +00:00
parent e0c9faba4d
commit a2e7cbe308

View file

@ -669,8 +669,7 @@ zle_setline(Histent he)
zleline = zalloc((zlell + 2) * ZLE_CHAR_SIZE);
ZS_memcpy(zleline, he->zle_text, zlell);
zlecs = zlell;
if (zlecs > findbol() && invicmdmode())
if ((zlecs = zlell) && invicmdmode())
zlecs--;
} else {
setline(he->text, ZSL_COPY|ZSL_TOEND);