modify readline so it adjusts internal variables when the locale changes between calls to readline()

This commit is contained in:
Chet Ramey committed 2022-08-15 12:32:00 -04:00
1 parent 0142068628
commit b9ed20acfd
24 files changed
+4908 -4758

No files matched your search

+3 -1
View File
@@ -417,7 +417,9 @@ cutfile (v, list, ops)
while ((n = zgetline (fd, &line, &llen, '\n', unbuffered_read)) != -1)
{
QUIT;
cutline (v, line, ops); /* can modify line */
if (line[n] == '\n')
line[n] = '\0'; /* cutline expects no newline terminator */
cutline (v, line, ops); /* can modify line */
}
if (fd > 0)
close (fd);