diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2009-03-13 09:58:14 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-03-13 09:58:14 +0000 |
commit | b7f4c91597226b5f95f7f153618cf52c665c0b71 (patch) | |
tree | 422e94bd2edbbc31ccea38197dca466263b057ee /Src | |
parent | c6d43a07f7e48f2dbc96896aeeadbabd1c344e13 (diff) | |
download | zsh-b7f4c91597226b5f95f7f153618cf52c665c0b71.tar.gz zsh-b7f4c91597226b5f95f7f153618cf52c665c0b71.tar.xz zsh-b7f4c91597226b5f95f7f153618cf52c665c0b71.zip |
users/13903 fix vi search prompt and repeat
Diffstat (limited to 'Src')
-rw-r--r-- | Src/Zle/zle_hist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Src/Zle/zle_hist.c b/Src/Zle/zle_hist.c index aec847ec6..532787bfa 100644 --- a/Src/Zle/zle_hist.c +++ b/Src/Zle/zle_hist.c @@ -1742,7 +1742,7 @@ getvisrchstr(void) selectkeymap("main", 1); while (sptr) { sbuf[sptr] = '_'; - sbuf[sptr] = '\0'; + sbuf[sptr+1] = '\0'; zrefresh(); if (!(cmd = getkeycmd()) || cmd == Th(z_sendbreak)) { ret = 0; @@ -1760,6 +1760,10 @@ getvisrchstr(void) cmd == Th(z_vicmdmode)) { sbuf[sptr] = ZWC('\0'); visrchstr = ztrdup(sbuf+1); + if (!strlen(visrchstr)) { + zsfree(visrchstr); + visrchstr = ztrdup(vipenultsrchstr); + } ret = 1; sptr = 0; } else if(cmd == Th(z_backwarddeletechar) || |