* Jason A. Donenfeld <[email protected]> [2012-10-30 17:58]: > Doing it this way, you don't have to hard code the initial space, > since m % n < n.
Not really true. If you are in the 8th column (i.e., there are 8 characters on the line), you need a tab to be 8 spaces wide. Otherwise, a tab should pad to the next multiple of 8. So it's rather: len % 8 == 0 ? 8 : (8 - len % 8) Julius _______________________________________________ cgit mailing list [email protected] http://hjemli.net/mailman/listinfo/cgit
