diff --git a/src/vte.c b/src/vte.c
index 642a6b4..044c913 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -6757,14 +6757,14 @@ vte_terminal_extend_selection(VteTerminal *terminal, long x, long y,
 			/* The left band */
 			_vte_invalidate_region (terminal,
 						MIN(sc->col, so->col),
-						MAX(sc->col, so->col) - 1,
+						MAX(sc->col, so->col) - 1 + (VTE_TAB_WIDTH_MAX - 1),
 						MIN(sc->row, so->row),
 						MAX(ec->row, eo->row),
 						TRUE);
 			/* The right band */
 			_vte_invalidate_region (terminal,
 						MIN(ec->col, eo->col) + 1,
-						MAX(ec->col, eo->col),
+						MAX(ec->col, eo->col) + (VTE_TAB_WIDTH_MAX - 1),
 						MIN(sc->row, so->row),
 						MAX(ec->row, eo->row),
 						TRUE);
diff --git a/src/vterowdata.h b/src/vterowdata.h
index 6af9634..aed9412 100644
--- a/src/vterowdata.h
+++ b/src/vterowdata.h
@@ -26,6 +26,8 @@
 
 G_BEGIN_DECLS
 
+#define VTE_TAB_WIDTH_BITS		4  /* Has to be able to store the value of 8. */
+#define VTE_TAB_WIDTH_MAX		((1 << VTE_TAB_WIDTH_BITS) - 1)
 
 #define VTE_DEFAULT_FG			256
 #define VTE_DEFAULT_BG			257
@@ -47,11 +49,10 @@ G_BEGIN_DECLS
 
 typedef struct _VteCellAttr {
 	guint64 fragment: 1;	/* A continuation cell. */
-	guint64 columns: 4;	/* Number of visible columns
-				   (as determined by g_unicode_iswide(c)).
-				   Also abused for tabs; bug 353610
-				   Keep at least 4 for tabs to work
-				   */
+	guint64 columns: VTE_TAB_WIDTH_BITS;	/* Number of visible columns
+						   (as determined by g_unicode_iswide(c)).
+						   Also abused for tabs; bug 353610
+						   */
 	guint64 bold: 1;
 	guint64 italic: 1;
 	guint64 fore: 25;	/* Index into color palette, or direct RGB, */
diff --git a/src/vteseq.c b/src/vteseq.c
index 8371ebb..3d76143 100644
--- a/src/vteseq.c
+++ b/src/vteseq.c
@@ -1717,22 +1717,19 @@ vte_sequence_handler_tab (VteTerminal *terminal, GValueArray *params)
 			}
 			/* Nothing found on the line after us, turn this into
 			 * a smart tab */
-			if (!found) {
+			if (!found && newcol - col <= VTE_TAB_WIDTH_MAX) {
 				VteCell *cell = _vte_row_data_get_writable (rowdata, col);
 				VteCell tab = *cell;
 				tab.attr.columns = newcol - col;
 				tab.c = '\t';
-				/* Check if it fits in columns */
-				if (tab.attr.columns == newcol - col) {
-					/* Save tab char */
-					*cell = tab;
-					/* And adjust the fragments */
-					for (i = col + 1; i < newcol; i++) {
-						cell = _vte_row_data_get_writable (rowdata, i);
-						cell->c = '\t';
-						cell->attr.columns = 1;
-						cell->attr.fragment = 1;
-					}
+				/* Save tab char */
+				*cell = tab;
+				/* And adjust the fragments */
+				for (i = col + 1; i < newcol; i++) {
+					cell = _vte_row_data_get_writable (rowdata, i);
+					cell->c = '\t';
+					cell->attr.columns = 1;
+					cell->attr.fragment = 1;
 				}
 			}
 		}
