瀏覽代碼

Merge pull request #40 from myint/division

Use correct integer division
Matthew Wang 10 年之前
父節點
當前提交
0c9f80852d
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      cdiff.py

+ 1
- 1
cdiff.py 查看文件

@@ -508,7 +508,7 @@ class DiffMarker(object):
508 508
                 # [terminal size minus the line number columns and 3 separating
509 509
                 # spaces
510 510
                 #
511
-                width = (terminal_size()[0] - num_width * 2 - 3) / 2
511
+                width = (terminal_size()[0] - num_width * 2 - 3) // 2
512 512
             except Exception:
513 513
                 # If terminal detection failed, set back to default
514 514
                 width = 80