Patchwork D6171: crecord: draw on the whole screen

login
register
mail settings
Submitter phabricator
Date March 27, 2019, 7:37 p.m.
Message ID <915fb638a4ffeb2da56cfc40528ca960@localhost.localdomain>
Download mbox | patch
Permalink /patch/39405/
State Not Applicable
Headers show

Comments

phabricator - March 27, 2019, 7:37 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG66fc05ff0ea3: crecord: draw on the whole screen (authored by jakalx, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6171?vs=14594&id=14598

REVISION DETAIL
  https://phab.mercurial-scm.org/D6171

AFFECTED FILES
  mercurial/crecord.py

CHANGE DETAILS




To: jakalx, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -962,8 +962,8 @@ 
         # turn tabs into spaces
         instr = instr.expandtabs(4)
         strwidth = encoding.colwidth(instr)
-        numspaces = (width - ((strwidth + xstart) % width) - 1)
-        return instr + " " * numspaces + "\n"
+        numspaces = (width - ((strwidth + xstart) % width))
+        return instr + " " * numspaces
 
     def printstring(self, window, text, fgcolor=None, bgcolor=None, pair=None,
         pairname=None, attrlist=None, towin=True, align=True, showwhtspc=False):
@@ -1770,6 +1770,12 @@ 
         # fit on the terminal.
         self.stdscr.clear()
 
+        # don't display the cursor
+        try:
+            curses.curs_set(0)
+        except curses.error:
+            pass
+
         # available colors: black, blue, cyan, green, magenta, white, yellow
         # init_pair(color_id, foreground_color, background_color)
         self.initcolorpair(None, None, name="normal")