[PATCH V2] crecord: fix statup crash of curses UI

Laurent Charignon lcharignon at fb.com
Wed Mar 18 20:04:12 UTC 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1426700642 25200
#      Wed Mar 18 10:44:02 2015 -0700
# Node ID 3d59a52a29862ca349fa466f4a09286106041f95
# Parent  365b6d3e8e5046ab0e538686dd8cf25f73efa039
crecord: fix statup crash of curses UI

Introduced by 7d5f935bd705, not caught by the tests as they don't cover the UI
code

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -872,7 +872,7 @@
         width = self.xscreensize
         # turn tabs into spaces
         instr = instr.expandtabs(4)
-        strwidth = encoding.ucolwidth(instr)
+        strwidth = encoding.colwidth(instr)
         numspaces = (width - ((strwidth + xstart) % width) - 1)
         return instr + " " * numspaces + "\n"
 


More information about the Mercurial-devel mailing list