summaryrefslogtreecommitdiffhomepage
path: root/miscutils/less.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/less.c')
-rw-r--r--miscutils/less.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/miscutils/less.c b/miscutils/less.c
index 7c46ba5cc..90c103888 100644
--- a/miscutils/less.c
+++ b/miscutils/less.c
@@ -331,8 +331,10 @@ static void re_wrap(void)
*d = *s;
if (*d != '\0') {
new_line_pos++;
- if (*d == '\t') /* tab */
+ if (*d == '\t') { /* tab */
new_line_pos += 7;
+ new_line_pos &= (~7);
+ }
s++;
d++;
if (new_line_pos >= w) {