diff options
author | Wayne Davison <wayned@users.sourceforge.net> | 2005-12-12 18:35:47 +0000 |
---|---|---|
committer | Wayne Davison <wayned@users.sourceforge.net> | 2005-12-12 18:35:47 +0000 |
commit | a2e7cbe30825b1a81d6c93a056b229fd044face0 (patch) | |
tree | 46e28df13ca7ef5ccea632ac9220811bec111524 | |
parent | e0c9faba4df38b0000b3c1f2a5d88ba723adea86 (diff) | |
download | zsh-a2e7cbe30825b1a81d6c93a056b229fd044face0.tar.gz zsh-a2e7cbe30825b1a81d6c93a056b229fd044face0.tar.xz zsh-a2e7cbe30825b1a81d6c93a056b229fd044face0.zip |
A slightly more optimal way to fix the zle_setline() bug using
the same zlecs-checking idiom as setline().
-rw-r--r-- | Src/Zle/zle_hist.c | 3 |
1 files changed, 1 insertions, 2 deletions
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); |