Skip to content

Commit

Permalink
[status cosmetic] remove dangling truncator in edit widget with fullw…
Browse files Browse the repository at this point in the history
…idth characters
  • Loading branch information
saulpw committed Aug 11, 2018
1 parent 8eb3d2e commit 8013384
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions visidata/vdtui.py
Original file line number Diff line number Diff line change
Expand Up @@ -2530,7 +2530,7 @@ def rfind_nonword(s, a, b):

dispi = i # the onscreen offset within the field where v[i] is displayed
if len(dispval) < w: # entire value fits
dispval += fillchar*(w-len(dispval))
dispval += fillchar*(w-len(dispval)-1)
elif i == len(dispval): # cursor after value (will append)
dispi = w-1
dispval = left_truncchar + dispval[len(dispval)-w+2:] + fillchar
Expand All @@ -2545,7 +2545,7 @@ def rfind_nonword(s, a, b):
dispval = left_truncchar + dispval[i-w//2+1:i+w//2-k] + right_truncchar

prew = clipdraw(scr, y, x, dispval[:dispi], attr, w)
clipdraw(scr, y, x+prew, dispval[dispi:], attr, w-prew)
clipdraw(scr, y, x+prew, dispval[dispi:], attr, w-prew+1)
scr.move(y, x+prew)
ch = vd().getkeystroke(scr)
if ch == '': continue
Expand Down

0 comments on commit 8013384

Please sign in to comment.