* Cleanup of TextElement.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@838 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2007-01-01 06:52:56 +00:00
parent 0854e65775
commit fe7adfc999
12 changed files with 98 additions and 97 deletions
+4 -9
View File
@@ -57,19 +57,14 @@ void
Canvas::print_attributes(unsigned int x, unsigned int y, const char* first, const char* last, const attributes_list* attributes) {
move(x, y);
int attr = A_NORMAL;
attributes_list::const_iterator attrItr = attributes->begin();
Attributes current = Attributes(first, Attributes::a_normal, Attributes::color_default);
while (first != last) {
if (attrItr != attributes->end() && attrItr->position() <= first) {
attr = attrItr->attributes();
// Set colors or something.
if (attrItr != attributes->end() && first >= attrItr->position())
current = *attrItr++;
attrItr++;
continue;
}
waddch(m_window, *first++ | attr);
waddch(m_window, *first++ | current.attributes());
}
// Reset the color.