changeset 43159:b02387005515

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').
author Denis Laxalde <denis.laxalde@logilab.fr>
date Thu, 10 Oct 2019 12:22:15 +0200
parents ff615b6b5b8f
children 84a950007619
files mercurial/crecord.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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