# HG changeset patch # User Denis Laxalde # Date 1570702935 -7200 # Node ID b0238700551593257f293fd838f2ac030d00cede # Parent ff615b6b5b8f03250dcc6fea1bf1a12f7fe526b7 py3: use integer division in curseschunkselector.printstring() This fixes a crash when scrolling in curses UI when refresh() is called when a float value (namely 'self.firstlineofpadtoprint', taking its value indirectly from 'self.linesprintedtopadsofar'). diff -r ff615b6b5b8f -r b02387005515 mercurial/crecord.py --- a/mercurial/crecord.py Thu Oct 10 12:20:23 2019 +0200 +++ b/mercurial/crecord.py Thu Oct 10 12:22:15 2019 +0200 @@ -1156,7 +1156,7 @@ # is reset to 0 at the beginning of printitem() - linesprinted = (xstart + len(t)) / self.xscreensize + linesprinted = (xstart + len(t)) // self.xscreensize self.linesprintedtopadsofar += linesprinted return t