-/* $OpenBSD: cmd-parse.y,v 1.50 2023/03/15 08:15:39 nicm Exp $ */
+/* $OpenBSD: cmd-parse.y,v 1.51 2024/08/04 09:42:23 nicm Exp $ */
/*
* Copyright (c) 2019 Nicholas Marriott <nicholas.marriott@gmail.com>
continue;
}
+ if (ch == '\r') {
+ /*
+ * Treat \r\n as \n.
+ */
+ ch = yylex_getc();
+ if (ch != '\n') {
+ yylex_ungetc(ch);
+ ch = '\r';
+ }
+ }
if (ch == '\n') {
/*
* End of line. Update the line number.
log_debug("%s: end at EOF", __func__);
break;
}
+ if (state == NONE && ch == '\r') {
+ ch = yylex_getc();
+ if (ch != '\n') {
+ yylex_ungetc(ch);
+ ch = '\r';
+ }
+ }
if (state == NONE && ch == '\n') {
log_debug("%s: end at EOL", __func__);
break;
-/* $OpenBSD: tty.c,v 1.437 2024/08/04 09:35:30 nicm Exp $ */
+/* $OpenBSD: tty.c,v 1.438 2024/08/04 09:42:23 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
tty_colours(struct tty *tty, const struct grid_cell *gc)
{
struct grid_cell *tc = &tty->cell;
- int have_ax;
/* No changes? Nothing is necessary. */
if (gc->fg == tc->fg && gc->bg == tc->bg && gc->us == tc->us)