commit bash-20151218 snapshot

This commit is contained in:
Chet Ramey
2015-12-21 10:41:17 -05:00
parent 3f2135aaac
commit 25340ead08
7 changed files with 88 additions and 43 deletions
+11 -1
View File
@@ -560,8 +560,12 @@ add_character:
if (wstart >= 0)
cxt->search_string[cxt->search_string_index = wstart] = '\0';
else
rl_ding ();
cxt->search_string[cxt->search_string_index = 0] = '\0';
}
if (cxt->search_string_index == 0)
rl_ding ();
break;
case -4: /* C-G, abort */
@@ -654,6 +658,12 @@ add_character:
for (cxt->sflags &= ~(SF_FOUND|SF_FAILED);; )
{
if (cxt->search_string_index == 0)
{
cxt->sflags |= SF_FAILED;
break;
}
limit = cxt->sline_len - cxt->search_string_index + 1;
/* Search the current line. */