summaryrefslogtreecommitdiffstats
path: root/term.c
diff options
context:
space:
mode:
Diffstat (limited to 'term.c')
-rw-r--r--term.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/term.c b/term.c
index 1151037c..65ca6ffa 100644
--- a/term.c
+++ b/term.c
@@ -1,7 +1,7 @@
/* $Id$ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2010-2016 Ingo Schwarze <schwarze@openbsd.org>
*
* 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;