commit f2fe1fd263233978c4dc83cd80f8774d39c641bd
parent 3cba266d4d038ae0c48d993c81580e9fb8eb2f9b
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 10 May 2006 03:44:49 +0000
cosmetic fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3489 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -76,6 +76,8 @@ CVS code -
(DLR)
parse_browser_input()
- Remove redundant key checks. (DLR)
+ browser_refresh()
+ - Rename variable editline to line, for consistency. (DLR)
- files.c:
open_file()
- Remove redundant wording in the error message when we try to
diff --git a/src/browser.c b/src/browser.c
@@ -544,7 +544,7 @@ void browser_refresh(void)
{
struct stat st;
int i;
- int col = 0, filecols = 0, editline = 0;
+ int col = 0, line = 0, filecols = 0;
size_t foo_len = mb_cur_max() * 7;
char *foo = charalloc(foo_len + 1);
@@ -555,7 +555,7 @@ void browser_refresh(void)
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,
FALSE);
@@ -563,8 +563,8 @@ void browser_refresh(void)
if (i == selected)
wattron(edit, A_REVERSE);
- blank_line(edit, editline, col, longest);
- mvwaddstr(edit, editline, col, disp);
+ blank_line(edit, line, col, longest);
+ mvwaddstr(edit, line, col, disp);
free(disp);
col += longest;
@@ -595,7 +595,7 @@ void browser_refresh(void)
else
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)
wattroff(edit, A_REVERSE);
@@ -603,10 +603,10 @@ void browser_refresh(void)
/* Add some space between the columns. */
col += 2;
- /* If the next entry isn't going to fit on the line,
- * move to the next line. */
+ /* If the next entry isn't going to fit on the line, move to the
+ * next line. */
if (col > COLS - longest) {
- editline++;
+ line++;
col = 0;
/* Set the number of columns to display the list in, if
@@ -615,7 +615,7 @@ void browser_refresh(void)
width = filecols;
}
- wmove(edit, editline, col);
+ wmove(edit, line, col);
}
free(foo);