]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Backport:
authorRaymond Hettinger <python@rcn.com>
Mon, 23 Sep 2002 14:06:24 +0000 (14:06 +0000)
committerRaymond Hettinger <python@rcn.com>
Mon, 23 Sep 2002 14:06:24 +0000 (14:06 +0000)
Properly fix SF bug #507298 (Gregor Lingl): shellpython2.2 -Qnew smart
indent error

Use // where int division is intended.

Tools/idle/EditorWindow.py

index a6bf090df319bc02bcf7d3c2af2cc0f2d56de066..35395310a68fd69d3accf2e0b4afd344df89305c 100644 (file)
@@ -466,7 +466,7 @@ class EditorWindow:
         top, bot = self.getwindowlines()
         lineno = self.getlineno(mark)
         height = bot - top
-        newtop = max(1, lineno - height/2)
+        newtop = max(1, lineno - height//2)
         text.yview(float(newtop))
 
     def getwindowlines(self):