mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-15 13:34:18 +01:00
unposted (cf. 49202 and 49217): insertlastword ignores blank/missing history entries when repeating
This commit is contained in:
parent
7000b04e76
commit
35c87f0b3b
@ -1,5 +1,8 @@
|
||||
2021-09-06 Bart Schaefer <schaefer@zsh.org>
|
||||
|
||||
* unposted (cf. 49202 and 49217): Src/Zle/zle_hist.c: insertlastword
|
||||
ignores blank/missing history entries when repeating
|
||||
|
||||
* 49196: Src/Modules/db_gdbm.c: gdbm keys not present in the
|
||||
database appear unset in tied hashes
|
||||
|
||||
|
@ -683,8 +683,13 @@ insertlastword(char **args)
|
||||
}
|
||||
nwords = countlinknodes(l);
|
||||
} else {
|
||||
/* Some stored line. */
|
||||
if (!(he = quietgethist(evhist)) || !he->nwords) {
|
||||
/* Some stored line. By default, search for a non-empty line. */
|
||||
while ((he = quietgethist(evhist)) && histstep == -1 && !*args) {
|
||||
if (he->nwords)
|
||||
break;
|
||||
evhist = addhistnum(evhist, histstep, HIST_FOREIGN);
|
||||
}
|
||||
if (!he || !he->nwords) {
|
||||
unmetafy_line();
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user