Skip to content

Commit

Permalink
[cliptext-] do not replace printable ascii with modchar #1034 #758'
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Jun 29, 2021
1 parent 5505d72 commit d993c6a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion visidata/cliptext.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ def dispwidth(ss, maxwidth=None):
def _dispch(c, oddspacech=None, combch=None, modch=None):
ccat = unicodedata.category(c)
if ccat in ['Mn', 'Sk', 'Lm']:
return modch, 1
if unicodedata.name(c).startswith('MODIFIER'):
return modch, 1
elif c != ' ' and ccat in ('Cc', 'Zs', 'Zl'): # control char, space, line sep
return oddspacech, 1
elif c in ZERO_WIDTH_CF:
Expand Down

0 comments on commit d993c6a

Please sign in to comment.