summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);