-/* $Id: roff.c,v 1.391 2022/05/31 20:23:05 schwarze Exp $ */
+/* $Id: roff.c,v 1.392 2022/06/02 11:29:07 schwarze Exp $ */
/*
* Copyright (c) 2010-2015, 2017-2022 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* it to backslashes and translate backslashes to \e.
*/
- if (roff_escape(buf->buf, ln, pos,
- &iesc, &iarg, &iendarg, &iend) != ESCAPE_EXPAND) {
+ if (roff_escape(buf->buf, ln, pos, &iesc, &inam,
+ &iarg, &iendarg, &iend) != ESCAPE_EXPAND) {
while (pos < iend) {
if (buf->buf[pos] == ec) {
buf->buf[pos] = '\\';
continue;
}
- /*
- * Treat "\E" just like "\";
- * it only makes a difference in copy mode.
- */
-
- inam = iesc + 1;
- while (buf->buf[inam] == 'E')
- inam++;
-
/* Handle expansion. */
res = NULL;