summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Ward <ian@excess.org>2014-01-02 22:11:56 -0500
committerIan Ward <ian@excess.org>2014-01-02 22:11:56 -0500
commit58bf2899e9315740b8b46e50049ac6fe895b6a27 (patch)
tree432425ea1f1b513611acd7d96b69c422bd7b361f
parent0a42d906a8b1af26efe604ea7fb1d69631ef919c (diff)
downloadurwid-58bf2899e9315740b8b46e50049ac6fe895b6a27.tar.gz
second fix for raw_diplay: don't clear right when standout applied
-rw-r--r--urwid/raw_display.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/urwid/raw_display.py b/urwid/raw_display.py
index ec9364d..b1bcc11 100644
--- a/urwid/raw_display.py
+++ b/urwid/raw_display.py
@@ -660,6 +660,10 @@ class Screen(BaseScreen, RealTerminal):
return self._attrspec_to_escape(
AttrSpec('default','default'))
+ def using_standout(a):
+ a = self._pal_attrspec.get(a, a)
+ return isinstance(a, AttrSpec) and a.standout
+
ins = None
o.append(set_cursor_home())
cy = 0
@@ -690,9 +694,8 @@ class Screen(BaseScreen, RealTerminal):
whitespace_at_end = False
if row:
a, cs, run = row[-1]
- a = self._pal_attrspec.get(a, a)
- if (run[-1:] == B(' ') and not a.standout and
- self.back_color_erase):
+ if (run[-1:] == B(' ') and self.back_color_erase
+ and not using_standout(a)):
whitespace_at_end = True
row = row[:-1] + [(a, cs, run.rstrip(B(' ')))]
elif y == maxrow-1 and maxcol > 1: