Index: histfile.c =================================================================== --- histfile.c (revision 386) +++ histfile.c (working copy) @@ -228,7 +228,11 @@ for (line_end = line_start; line_end < bufend; line_end++) if (*line_end == '\n') { - *line_end = '\0'; + /* allow reading files with Windows like end-of-line */ + if ( line_end - 1 >= line_start && *( line_end - 1 ) =='\r' ) + *( line_end - 1 ) = '\0'; + else + *line_end = '\0'; if (*line_start) add_history (line_start);