mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-02 18:00:49 +02:00
commit bash-20051215 snapshot
This commit is contained in:
@@ -220,7 +220,7 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
|
||||
char *pmt;
|
||||
int *lp, *lip, *niflp, *vlp;
|
||||
{
|
||||
char *r, *ret, *p;
|
||||
char *r, *ret, *p, *igstart;
|
||||
int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
|
||||
|
||||
/* Short-circuit if we can. */
|
||||
@@ -244,13 +244,15 @@ expand_prompt (pmt, lp, lip, niflp, vlp)
|
||||
invfl = 0; /* invisible chars in first line of prompt */
|
||||
invflset = 0; /* we only want to set invfl once */
|
||||
|
||||
igstart = -1;
|
||||
for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
|
||||
{
|
||||
/* This code strips the invisible character string markers
|
||||
RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */
|
||||
if (*p == RL_PROMPT_START_IGNORE)
|
||||
if (*p == RL_PROMPT_START_IGNORE) /* XXX - check ignoring? */
|
||||
{
|
||||
ignoring++;
|
||||
ignoring = 1;
|
||||
igstart = p;
|
||||
continue;
|
||||
}
|
||||
else if (ignoring && *p == RL_PROMPT_END_IGNORE)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -714,7 +714,7 @@ _rl_dispatch_subseq (key, map, got_subseq)
|
||||
|
||||
rl_dispatching = 1;
|
||||
RL_SETSTATE(RL_STATE_DISPATCHING);
|
||||
r = (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
|
||||
(*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
|
||||
RL_UNSETSTATE(RL_STATE_DISPATCHING);
|
||||
rl_dispatching = 0;
|
||||
|
||||
|
||||
+7
-9
@@ -1071,7 +1071,7 @@ int
|
||||
rl_delete (count, key)
|
||||
int count, key;
|
||||
{
|
||||
int r;
|
||||
int xpoint;
|
||||
|
||||
if (count < 0)
|
||||
return (_rl_rubout_char (-count, key));
|
||||
@@ -1084,23 +1084,21 @@ rl_delete (count, key)
|
||||
|
||||
if (count > 1 || rl_explicit_arg)
|
||||
{
|
||||
int orig_point = rl_point;
|
||||
xpoint = rl_point;
|
||||
if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
|
||||
rl_forward_char (count, key);
|
||||
else
|
||||
rl_forward_byte (count, key);
|
||||
|
||||
r = rl_kill_text (orig_point, rl_point);
|
||||
rl_point = orig_point;
|
||||
return r;
|
||||
rl_kill_text (xpoint, rl_point);
|
||||
rl_point = xpoint;
|
||||
}
|
||||
else
|
||||
{
|
||||
int new_point;
|
||||
|
||||
new_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
|
||||
return (rl_delete_text (rl_point, new_point));
|
||||
xpoint = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
|
||||
rl_delete_text (rl_point, xpoint);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Delete the character under the cursor, unless the insertion
|
||||
|
||||
Reference in New Issue
Block a user