mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
145??: repeat last vi history search if search string is blank
This commit is contained in:
parent
56528ccb66
commit
e56c42c9fe
@ -1,3 +1,8 @@
|
||||
2001-05-29 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 145??: Src/Zle/zle_hist.c: repeat last vi history search
|
||||
if search string is empty.
|
||||
|
||||
2001-05-29 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* unposted: Completion/compdump, Completion/BSD/Command/_cvsup,
|
||||
@ -21,7 +26,7 @@
|
||||
|
||||
2001-05-29 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* 1454?: INSTALL: Mention "make check" and its usage.
|
||||
* 14545: INSTALL: Mention "make check" and its usage.
|
||||
|
||||
2001-05-29 Chmouel Boudjnah <chmouel@mandrakesoft.com>
|
||||
|
||||
|
@ -950,7 +950,7 @@ vifetchhistory(char **args)
|
||||
|
||||
/* the last vi search */
|
||||
|
||||
static char *visrchstr;
|
||||
static char *visrchstr, *vipenultsrchstr;
|
||||
static int visrchsense;
|
||||
|
||||
/**/
|
||||
@ -962,8 +962,12 @@ getvisrchstr(void)
|
||||
Thingy cmd;
|
||||
char *okeymap = curkeymapname;
|
||||
|
||||
if (vipenultsrchstr) {
|
||||
zsfree(vipenultsrchstr);
|
||||
}
|
||||
|
||||
if (visrchstr) {
|
||||
zsfree(visrchstr);
|
||||
vipenultsrchstr = visrchstr;
|
||||
visrchstr = NULL;
|
||||
}
|
||||
clearlist = 1;
|
||||
@ -990,6 +994,10 @@ getvisrchstr(void)
|
||||
cmd == Th(z_vicmdmode)) {
|
||||
sbuf[sptr] = 0;
|
||||
visrchstr = metafy(sbuf + 1, sptr - 1, META_DUP);
|
||||
if (!strlen(visrchstr)) {
|
||||
zsfree(visrchstr);
|
||||
visrchstr = vipenultsrchstr;
|
||||
}
|
||||
ret = 1;
|
||||
sptr = 0;
|
||||
} else if(cmd == Th(z_backwarddeletechar) ||
|
||||
|
Loading…
Reference in New Issue
Block a user