summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: aa936d2)
raw | patch | inline | side by side (parent: aa936d2)
author | Max Kellermann <max@duempel.org> | |
Sat, 10 Oct 2009 18:20:24 +0000 (20:20 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sat, 10 Oct 2009 18:20:24 +0000 (20:20 +0200) |
Clear the space after the text before drawing the second column. The
continue drawing the second column.
continue drawing the second column.
src/list_window.c | patch | blob | history |
diff --git a/src/list_window.c b/src/list_window.c
index 124b48226fc601729c27b752906f61851b5cb3fd..0150fd6c3cee16fcb56a3c26e0a644051f6a707d 100644 (file)
--- a/src/list_window.c
+++ b/src/list_window.c
wattron(w, A_REVERSE);
waddstr(w, text);
- if (options.wide_cursor && text_width < width)
- whline(w, ' ', width - text_width);
+
+ /* erase the unused space after the text */
+ if (text_width < width) {
+ if (options.wide_cursor)
+ whline(w, ' ', width - text_width);
+ else
+ wclrtoeol(w);
+ }
if (second_column_width > 0) {
wmove(w, y, width);
if (selected)
wattroff(w, A_REVERSE);
-
- if (!options.wide_cursor && text_width < width) {
- if (second_column_width == 0)
- /* the cursor is at the end of the text; clear
- the rest of this row */
- wclrtoeol(w);
- else
- /* there's a second column: clear the space
- between the first and the second column */
- mvwhline(w, y, text_width, ' ', width - text_width);
- }
}
void