mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-07 10:42:28 +02:00
fix for crash when executing PROMPT_COMMAND; fix for readline crash when rl_save_prompt is not followed by rl_set_prompt; fix for bash C-xg key binding listing completions; fix for precision overflow issue in printf; fix for readline non-multibyte builds
This commit is contained in:
@@ -783,7 +783,7 @@ _rl_optimize_redisplay (void)
|
||||
|
||||
/* Useful shorthand used by rl_redisplay, update_line, rl_move_cursor_relative */
|
||||
#define INVIS_FIRST() (local_prompt_invis_chars[0])
|
||||
#define WRAP_OFFSET(line, offset) ((line <= prompt_last_screen_line) ? local_prompt_invis_chars[line] : 0)
|
||||
#define WRAP_OFFSET(line, offset) ((line <= prompt_last_screen_line && local_prompt_invis_chars) ? local_prompt_invis_chars[line] : 0)
|
||||
|
||||
#define W_OFFSET(line, offset) ((line) == 0 ? offset : 0)
|
||||
#define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
|
||||
|
||||
@@ -2098,7 +2098,10 @@ Readline.
|
||||
@deftypefun int rl_complete_internal (int what_to_do)
|
||||
Complete the word at or before point.
|
||||
@var{what_to_do} says what to do with the completion.
|
||||
A value of @samp{?} means list the possible completions.
|
||||
A value of @samp{?} means list the possible completions,
|
||||
but to insert a single completion if the last completion failed to find
|
||||
any matches.
|
||||
@samp{|} unconditionally lists the possible completions.
|
||||
@samp{TAB} means do standard completion.
|
||||
@samp{*} means insert all of the possible completions.
|
||||
@samp{!} means to display all of the possible completions,
|
||||
|
||||
@@ -121,7 +121,7 @@ _rl_utf8_mblen (const char *s, size_t n)
|
||||
return 3;
|
||||
}
|
||||
}
|
||||
else if (c < 0xf4)
|
||||
else if (c <= 0xf4)
|
||||
{
|
||||
if (n == 1)
|
||||
return -2;
|
||||
@@ -584,6 +584,7 @@ _rl_find_prev_mbchar (const char *string, int seed, int flags)
|
||||
#endif
|
||||
}
|
||||
|
||||
#if defined (HANDLE_MULTIBYTE)
|
||||
/* Compare the first N characters of S1 and S2 without regard to case. If
|
||||
FLAGS&1, apply the mapping specified by completion-map-case and make
|
||||
`-' and `_' equivalent. Returns 1 if the strings are equal. */
|
||||
@@ -658,3 +659,4 @@ _rl_mb_charcasecmp (const char *s1, mbstate_t *ps1, const char *s2, mbstate_t *p
|
||||
return 1;
|
||||
return (wc1 == wc2);
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user