Backport:

Properly fix SF bug #507298 (Gregor Lingl): shellpython2.2 -Qnew smart
indent error

Use // where int division is intended.
This commit is contained in:
Raymond Hettinger
2002-09-23 14:06:24 +00:00
parent 9eda652c44
commit 1d429f2464

View 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):