Bash-4.4 distribution sources and documentation

This commit is contained in:
Chet Ramey 2016-09-15 16:59:08 -04:00
commit a0c0a00fc4
588 changed files with 130746 additions and 80164 deletions

View file

@ -6,7 +6,7 @@
/* */
/* **************************************************************** */
/* Copyright (C) 1987-2012 Free Software Foundation, Inc.
/* Copyright (C) 1987-2015 Free Software Foundation, Inc.
This file is part of the GNU Readline Library (Readline), a library
for reading lines of text with interactive input and history editing.
@ -66,7 +66,6 @@ static int rl_search_history PARAMS((int, int));
static _rl_search_cxt *_rl_isearch_init PARAMS((int));
static void _rl_isearch_fini PARAMS((_rl_search_cxt *));
static int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int));
/* Last line found by the current incremental search, so we don't `find'
identical lines many times in a row. Now part of isearch context. */
@ -553,8 +552,20 @@ add_character:
do until we have a real isearch-undo. */
if (cxt->search_string_index == 0)
rl_ding ();
else
else if (MB_CUR_MAX == 1 || rl_byte_oriented)
cxt->search_string[--cxt->search_string_index] = '\0';
else
{
wstart = _rl_find_prev_mbchar (cxt->search_string, cxt->search_string_index, MB_FIND_NONZERO);
if (wstart >= 0)
cxt->search_string[cxt->search_string_index = wstart] = '\0';
else
cxt->search_string[cxt->search_string_index = 0] = '\0';
}
if (cxt->search_string_index == 0)
rl_ding ();
break;
case -4: /* C-G, abort */
@ -647,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. */
@ -716,7 +733,7 @@ add_character:
return 1;
}
static int
int
_rl_isearch_cleanup (cxt, r)
_rl_search_cxt *cxt;
int r;