From a2e7cbe30825b1a81d6c93a056b229fd044face0 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Mon, 12 Dec 2005 18:35:47 +0000 Subject: A slightly more optimal way to fix the zle_setline() bug using the same zlecs-checking idiom as setline(). --- Src/Zle/zle_hist.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Src/Zle/zle_hist.c') diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index a61f7f59e..31fa6ace0 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -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); -- cgit 1.4.1