=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/term.c,v retrieving revision 1.118 retrieving revision 1.119 diff -c -r1.118 -r1.119 *** src/usr.bin/mandoc/term.c 2016/08/10 11:02:30 1.118 --- src/usr.bin/mandoc/term.c 2017/01/08 18:08:44 1.119 *************** *** 1,7 **** ! /* $OpenBSD: term.c,v 1.118 2016/08/10 11:02:30 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons ! * Copyright (c) 2010-2016 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above --- 1,7 ---- ! /* $OpenBSD: term.c,v 1.119 2017/01/08 18:08:44 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons ! * Copyright (c) 2010-2017 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above *************** *** 604,611 **** if (ASCII_HYPH == word[i] || isgraph((unsigned char)word[i])) encode1(p, word[i]); ! else p->buf[p->col++] = word[i]; } } --- 604,623 ---- if (ASCII_HYPH == word[i] || isgraph((unsigned char)word[i])) encode1(p, word[i]); ! else { p->buf[p->col++] = word[i]; + + /* + * Postpone the effect of \z while handling + * an overstrike sequence from ascii_uc2str(). + */ + + if (word[i] == '\b' && + (p->flags & TERMP_BACKBEFORE)) { + p->flags &= ~TERMP_BACKBEFORE; + p->flags |= TERMP_BACKAFTER; + } + } } }