simplify, and add missing comments
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3730 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
345a5b84bf
Коммит
a0283b7710
@ -574,7 +574,9 @@ void browser_refresh(void)
|
|||||||
for (; i < filelist_len && line < editwinrows; i++) {
|
for (; i < filelist_len && line < editwinrows; i++) {
|
||||||
struct stat st;
|
struct stat st;
|
||||||
const char *filetail = tail(filelist[i]);
|
const char *filetail = tail(filelist[i]);
|
||||||
size_t filetaillen = strlenpt(filetail), foo_col;
|
/* The filename we display, minus the path. */
|
||||||
|
size_t filetaillen = strlenpt(filetail);
|
||||||
|
/* The length of the filename in columns. */
|
||||||
bool dots = (filetaillen > longest - 8);
|
bool dots = (filetaillen > longest - 8);
|
||||||
/* Do we put an ellipsis before the filename? */
|
/* Do we put an ellipsis before the filename? */
|
||||||
char *disp = display_string(filetail, dots ? filetaillen -
|
char *disp = display_string(filetail, dots ? filetaillen -
|
||||||
@ -640,10 +642,7 @@ void browser_refresh(void)
|
|||||||
(unsigned int)(st.st_size >> 30));
|
(unsigned int)(st.st_size >> 30));
|
||||||
}
|
}
|
||||||
|
|
||||||
foo_col = col - strlenpt(foo);
|
mvwaddstr(edit, line, col - strlenpt(foo), foo);
|
||||||
|
|
||||||
mvwaddnstr(edit, line, foo_col, foo, actual_x(foo, longest -
|
|
||||||
foo_col));
|
|
||||||
|
|
||||||
if (i == selected)
|
if (i == selected)
|
||||||
wattroff(edit, reverse_attr);
|
wattroff(edit, reverse_attr);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user