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

This commit is contained in:
Chet Ramey
2022-08-15 12:32:00 -04:00
parent 0142068628
commit b9ed20acfd
24 changed files with 4908 additions and 4758 deletions
+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);