mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-06-28 16:09:51 +02:00
commit bash-20110715 snapshot
This commit is contained in:
@@ -11967,3 +11967,10 @@ builtins/shopt.def
|
||||
|
||||
doc/{bash.1,bashref.texi}
|
||||
- document new `direxpand' shopt option
|
||||
|
||||
7/15
|
||||
----
|
||||
lib/readline/isearch.c
|
||||
- _rl_isearch_dispatch: when adding character to search string, use
|
||||
cxt->lastc (which we use in the switch statement) instead of c,
|
||||
since lastc can be modified earlier in the function
|
||||
|
||||
+19
-1
@@ -394,6 +394,24 @@ _rl_isearch_dispatch (cxt, c)
|
||||
rl_execute_next (cxt->prevc);
|
||||
return (0);
|
||||
}
|
||||
/* Otherwise, if the current character is mapped to self-insert (i.e.,
|
||||
not an editing command), and the previous character was a keymap
|
||||
index, then we need to insert both the previous character and the
|
||||
current character into the search string. */
|
||||
else if (cxt->lastc > 0 && cxt->prevc > 0 &&
|
||||
cxt->keymap[cxt->prevc].type == ISKMAP &&
|
||||
cxt->okeymap[cxt->lastc].type == ISFUNC && cxt->okeymap[cxt->lastc].function == rl_insert)
|
||||
{
|
||||
/* Make lastc be the next character read */
|
||||
rl_execute_next (cxt->lastc);
|
||||
/* Dispatch on the previous character (insert into search string) */
|
||||
cxt->lastc = cxt->prevc;
|
||||
/* Have to overwrite cxt->mb here because dispatch uses it below */
|
||||
cxt->mb[0] = cxt->lastc;
|
||||
cxt->mb[1] = '\0';
|
||||
|
||||
cxt->prevc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* The characters in isearch_terminators (set from the user-settable
|
||||
@@ -564,7 +582,7 @@ _rl_isearch_dispatch (cxt, c)
|
||||
}
|
||||
else
|
||||
#endif
|
||||
cxt->search_string[cxt->search_string_index++] = c;
|
||||
cxt->search_string[cxt->search_string_index++] = cxt->lastc; /* XXX - was c instead of lastc */
|
||||
cxt->search_string[cxt->search_string_index] = '\0';
|
||||
break;
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
Unless otherwise stated, all files in this directory are Copyright (C)
|
||||
1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,
|
||||
2004,2005,2006,2007,2008,2009
|
||||
2004,2005,2006,2007,2008,2009,2010,2011
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
The file ifs-posix.tests is Copyright (C) 2005 Glen Fowler.
|
||||
|
||||
Reference in New Issue
Block a user