Commit e7ea91f83ba0807482361c2a1695b5117ce08d8f

Stefan Sperling 2018-07-08T18:37:22

in tog, fix width calculation of lines with tabs

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tog/tog.c b/tog/tog.c
index 64c0291..c668240 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -177,7 +177,7 @@ format_line(wchar_t **wlinep, int *widthp, const char *line, int wlimit)
 			break;
 		case -1:
 			if (wline[i] == L'\t')
-				cols += TABSIZE;
+				cols += TABSIZE - (cols % TABSIZE);
 			break;
 		default:
 			err = got_error_from_errno();