browser: draw a bar of spaces only where needed -- for the selected item
The edit window has been fully cleared just before the list-drawing loop has started, so there is no need to wipe anything. Only for the highlighting bar all its characters need to be drawn with the correct attributes.master
parent
5f1d9af375
commit
3422ec3419
|
@ -524,16 +524,15 @@ void browser_refresh(void)
|
||||||
/* The filename (or a fragment of it) in displayable format.
|
/* The filename (or a fragment of it) in displayable format.
|
||||||
* When a fragment, account for dots plus one space padding. */
|
* When a fragment, account for dots plus one space padding. */
|
||||||
|
|
||||||
/* If this is the selected item, start its highlighting, and
|
/* If this is the selected item, draw its highlighted bar upfront, and
|
||||||
* remember its location to be able to place the cursor on it. */
|
* remember its location to be able to place the cursor on it. */
|
||||||
if (i == selected) {
|
if (i == selected) {
|
||||||
wattron(edit, interface_color_pair[SELECTED_TEXT]);
|
wattron(edit, interface_color_pair[SELECTED_TEXT]);
|
||||||
|
mvwprintw(edit, row, col, "%*s", longest, " ");
|
||||||
the_row = row;
|
the_row = row;
|
||||||
the_column = col;
|
the_column = col;
|
||||||
}
|
}
|
||||||
|
|
||||||
mvwprintw(edit, row, col, "%*s", longest, " ");
|
|
||||||
|
|
||||||
/* If the name is too long, we display something like "...ename". */
|
/* If the name is too long, we display something like "...ename". */
|
||||||
if (dots)
|
if (dots)
|
||||||
mvwaddstr(edit, row, col, "...");
|
mvwaddstr(edit, row, col, "...");
|
||||||
|
|
Loading…
Reference in New Issue