Mercurial > hg > python
changeset 15:22b0894c0f4c
fixed Column.updateHeader wrt 5a, but broke it wrt C0 and missing red for R2
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Sun, 22 Mar 2020 18:15:42 +0000 |
parents | 1e961cf10f88 |
children | a7a10e40b344 |
files | nono.py |
diffstat | 1 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/nono.py Sat Mar 21 21:15:52 2020 +0000 +++ b/nono.py Sun Mar 22 18:15:42 2020 +0000 @@ -192,13 +192,13 @@ # Overkill as is? dprint('cx',self.cLet+str(crosspos),pos) if self.runs: - start0=0 if self.margin0==0 else self.margin0+1 - if self.marginal(range(start0,pos+1),self.runs[0]): + start0=self.margin0 # 0 if self.margin0==0 else self.margin0+1 + if self.marginal(range(start0,pos),self.runs[0]): dprint('cx1a') else: dprint('cx1b') # if len(self.runs)>1: - startN=self.marginN if (self.marginN==self.n-1) else self.marginN-1 + startN=self.marginN # self.marginN if (self.marginN==self.n-1) else self.marginN-1 if self.marginal(range(startN,pos,-1),self.runs[-1]): dprint('cx2a') else: @@ -369,17 +369,18 @@ if pre: for rc in str(r): self.infix.append(RedFmt%rc) - self.infix.append("-" if self.runs else "") + if self.runs: + self.infix.append('-') else: # post - ins=["-"] + ins=["-"] if self.runs else [] for rc in str(r): ins.append(RedFmt%r) self.suffix=ins+self.suffix dprint('CuH1: |%s|,%s,%s,%s'%(self.prespace,self.infix,self.suffix,self.runs)) - self.header=(["-"]*self.prespace)+\ + self.header=([" "]*self.prespace)+\ self.infix+\ - ['-'.join(str(c) for c in self.runs)]+\ + (['-'.join(str(c) for c in self.runs)] if self.runs else [])+\ self.suffix else: # init