--- a/parse.y +++ b/parse.y @@ -1684,7 +1684,16 @@ into account, e.g., $(...\n) */ xchars = shell_input_line_len - shell_input_line_index; if (bash_input.location.string[-1] == '\n') - xchars++; + { + xchars++; +#ifdef __CYGWIN__ + { + extern int igncr; + if (igncr && bash_input.location.string[-2] == '\r') + xchars++; + } +#endif + } /* XXX - how to reflect bash_input.location.string back to string passed to parse_and_execute or xparse_dolparen? xparse_dolparen needs to know how