diff options
author | Andrew Dunai <andunai@gmail.com> | 2018-01-17 13:02:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-17 13:02:34 +0200 |
commit | 19c4443bbf2e77cbe5fd3eee0f9eedb28dd2803c (patch) | |
tree | cdb4324dc1ded1e7ab0cee4d6a265b7425a807d4 | |
parent | 4c959999d69d7976f6cb1e4dc6acf329691ef030 (diff) | |
parent | 7ee3eddd89996b745adad394234ab357a0bc2b2a (diff) | |
download | urwid-19c4443bbf2e77cbe5fd3eee0f9eedb28dd2803c.tar.gz |
Merge pull request #272 from rndusr/fix/underline-fullwidth
Fix underlining padded text
-rw-r--r-- | urwid/raw_display.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/urwid/raw_display.py b/urwid/raw_display.py index 626891d..e5275bd 100644 --- a/urwid/raw_display.py +++ b/urwid/raw_display.py @@ -750,9 +750,9 @@ class Screen(BaseScreen, RealTerminal): return self._attrspec_to_escape( AttrSpec('default','default')) - def using_standout(a): + def using_standout_or_underline(a): a = self._pal_attrspec.get(a, a) - return isinstance(a, AttrSpec) and a.standout + return isinstance(a, AttrSpec) and (a.standout or a.underline) ins = None o.append(set_cursor_home()) @@ -785,7 +785,7 @@ class Screen(BaseScreen, RealTerminal): if row: a, cs, run = row[-1] if (run[-1:] == B(' ') and self.back_color_erase - and not using_standout(a)): + and not using_standout_or_underline(a)): whitespace_at_end = True row = row[:-1] + [(a, cs, run.rstrip(B(' ')))] elif y == maxrow-1 and maxcol > 1: |