use anonymous files for here-documents if available and the document size exceeds pipe capacity; fixes to build if multibyte characters are unavailable; fix potential overflow with extrememly long $'...' strings; fix for readline redisplay highlighting with a zero-length region

This commit is contained in:
Chet Ramey
2026-07-24 12:13:30 -04:00
parent 03e7298d1e
commit 9b6349ef40
19 changed files with 138 additions and 23 deletions
+4
View File
@@ -120,10 +120,14 @@ static char **glob_dir_to_array (char *, char **, int);
/* Make sure these names continue to agree with what's in smatch.c */
extern char *glob_patscan (char *, char *, int, int);
#if defined (HANDLE_MULTIBYTE)
extern wchar_t *glob_patscan_wc (wchar_t *, wchar_t *, wint_t, int);
#endif
/* And this from gmisc.c/gm_loop.c */
#if defined (HANDLE_MULTIBYTE)
extern int wextglob_pattern_p (wchar_t *);
#endif
extern char *glob_dirscan (char *, int);
+3 -1
View File
@@ -1065,7 +1065,9 @@ rl_redisplay (void)
for (in = 0; in < rl_end; in++)
#endif
{
if (in == hl_begin)
if (hl_begin == hl_end)
cur_face = FACE_NORMAL; /* zero-length region/paste */
else if (in == hl_begin)
cur_face = FACE_STANDOUT;
else if (in == hl_end)
cur_face = FACE_NORMAL;
+2 -2
View File
@@ -50,11 +50,11 @@
char *
ansicstr (const char *string, size_t len, int flags, int *sawc, size_t *rlen)
{
int c, temp;
int c;
char *ret, *r;
const char *s;
unsigned long v;
size_t clen;
size_t temp, clen;
size_t mb_cur_max;
#if defined (HANDLE_MULTIBYTE)
wchar_t wc;