=================================================================== RCS file: /cvs/mandoc/term.c,v retrieving revision 1.257 retrieving revision 1.258 diff -u -p -r1.257 -r1.258 --- mandoc/term.c 2016/04/12 15:30:00 1.257 +++ mandoc/term.c 2016/08/10 11:03:43 1.258 @@ -1,7 +1,7 @@ -/* $Id: term.c,v 1.257 2016/04/12 15:30:00 schwarze Exp $ */ +/* $Id: term.c,v 1.258 2016/08/10 11:03:43 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2010-2015 Ingo Schwarze + * 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 @@ -504,7 +504,9 @@ term_word(struct termp *p, const char *word) } } /* Trim trailing backspace/blank pair. */ - if (p->col > 2 && p->buf[p->col - 1] == ' ') + if (p->col > 2 && + (p->buf[p->col - 1] == ' ' || + p->buf[p->col - 1] == '\t')) p->col -= 2; continue; default: @@ -568,7 +570,7 @@ encode1(struct termp *p, int c) p->fontq[p->fonti] : TERMFONT_NONE; if (p->flags & TERMP_BACKBEFORE) { - if (p->buf[p->col - 1] == ' ') + if (p->buf[p->col - 1] == ' ' || p->buf[p->col - 1] == '\t') p->col--; else p->buf[p->col++] = 8;