use floor division and add a test that exercises the tabsize codepath

This commit is contained in:
Benjamin Peterson 2009-10-15 01:49:37 +00:00
parent e537adfd08
commit 447dc15658
2 changed files with 18 additions and 1 deletions

View file

@ -319,7 +319,7 @@ def generate_tokens(readline):
if line[pos] == ' ':
column = column + 1
elif line[pos] == '\t':
column = (column/tabsize + 1)*tabsize
column = (column//tabsize + 1)*tabsize
elif line[pos] == '\f':
column = 0
else: