mirror of git://git.sv.gnu.org/nano.git
cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3489 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
3cba266d4d
commit
f2fe1fd263
|
@ -76,6 +76,8 @@ CVS code -
|
||||||
(DLR)
|
(DLR)
|
||||||
parse_browser_input()
|
parse_browser_input()
|
||||||
- Remove redundant key checks. (DLR)
|
- Remove redundant key checks. (DLR)
|
||||||
|
browser_refresh()
|
||||||
|
- Rename variable editline to line, for consistency. (DLR)
|
||||||
- files.c:
|
- files.c:
|
||||||
open_file()
|
open_file()
|
||||||
- Remove redundant wording in the error message when we try to
|
- Remove redundant wording in the error message when we try to
|
||||||
|
|
|
@ -544,7 +544,7 @@ void browser_refresh(void)
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int i;
|
int i;
|
||||||
int col = 0, filecols = 0, editline = 0;
|
int col = 0, line = 0, filecols = 0;
|
||||||
size_t foo_len = mb_cur_max() * 7;
|
size_t foo_len = mb_cur_max() * 7;
|
||||||
char *foo = charalloc(foo_len + 1);
|
char *foo = charalloc(foo_len + 1);
|
||||||
|
|
||||||
|
@ -555,7 +555,7 @@ void browser_refresh(void)
|
||||||
|
|
||||||
wmove(edit, 0, 0);
|
wmove(edit, 0, 0);
|
||||||
|
|
||||||
for (; i < filelist_len && editline <= editwinrows - 1; i++) {
|
for (; i < filelist_len && line <= editwinrows - 1; i++) {
|
||||||
char *disp = display_string(tail(filelist[i]), 0, longest,
|
char *disp = display_string(tail(filelist[i]), 0, longest,
|
||||||
FALSE);
|
FALSE);
|
||||||
|
|
||||||
|
@ -563,8 +563,8 @@ void browser_refresh(void)
|
||||||
if (i == selected)
|
if (i == selected)
|
||||||
wattron(edit, A_REVERSE);
|
wattron(edit, A_REVERSE);
|
||||||
|
|
||||||
blank_line(edit, editline, col, longest);
|
blank_line(edit, line, col, longest);
|
||||||
mvwaddstr(edit, editline, col, disp);
|
mvwaddstr(edit, line, col, disp);
|
||||||
free(disp);
|
free(disp);
|
||||||
|
|
||||||
col += longest;
|
col += longest;
|
||||||
|
@ -595,7 +595,7 @@ void browser_refresh(void)
|
||||||
else
|
else
|
||||||
sprintf(foo, "%4u GB", (unsigned int)(st.st_size >> 30));
|
sprintf(foo, "%4u GB", (unsigned int)(st.st_size >> 30));
|
||||||
|
|
||||||
mvwaddnstr(edit, editline, col - strlen(foo), foo, foo_len);
|
mvwaddnstr(edit, line, col - strlen(foo), foo, foo_len);
|
||||||
|
|
||||||
if (i == selected)
|
if (i == selected)
|
||||||
wattroff(edit, A_REVERSE);
|
wattroff(edit, A_REVERSE);
|
||||||
|
@ -603,10 +603,10 @@ void browser_refresh(void)
|
||||||
/* Add some space between the columns. */
|
/* Add some space between the columns. */
|
||||||
col += 2;
|
col += 2;
|
||||||
|
|
||||||
/* If the next entry isn't going to fit on the line,
|
/* If the next entry isn't going to fit on the line, move to the
|
||||||
* move to the next line. */
|
* next line. */
|
||||||
if (col > COLS - longest) {
|
if (col > COLS - longest) {
|
||||||
editline++;
|
line++;
|
||||||
col = 0;
|
col = 0;
|
||||||
|
|
||||||
/* Set the number of columns to display the list in, if
|
/* Set the number of columns to display the list in, if
|
||||||
|
@ -615,7 +615,7 @@ void browser_refresh(void)
|
||||||
width = filecols;
|
width = filecols;
|
||||||
}
|
}
|
||||||
|
|
||||||
wmove(edit, editline, col);
|
wmove(edit, line, col);
|
||||||
}
|
}
|
||||||
|
|
||||||
free(foo);
|
free(foo);
|
||||||
|
|
Loading…
Reference in New Issue