1
0
mirror of git://git.sv.gnu.org/nano.git synced 2025-03-22 01:13:02 +03:00

in browser_init(), fix off-by-one error when calculating longest that

kept the rightmost column of the screen from being used


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3717 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
David Lawrence Ramsey 2006-07-02 17:00:07 +00:00
parent 46c29c4351
commit c021925abb
2 changed files with 4 additions and 1 deletions

@ -17,6 +17,9 @@ CVS code -
- After entering "..", select the directory we were in before - After entering "..", select the directory we were in before
instead of the first filename in the list, as Pico does. (DLR) instead of the first filename in the list, as Pico does. (DLR)
- Simplify screen update handling and exiting. (DLR) - Simplify screen update handling and exiting. (DLR)
browser_init()
- Fix off-by-one error when calculating longest that kept the
rightmost column of the screen from being used. (DLR)
browser_refresh() browser_refresh()
- Simplify. (DLR) - Simplify. (DLR)
- Fix problems where translated versions of "(dir)" could be - Fix problems where translated versions of "(dir)" could be

@ -466,7 +466,7 @@ void browser_init(const char *path, DIR *dir)
i++; i++;
d_len = strlenpt(nextdir->d_name); d_len = strlenpt(nextdir->d_name) + 1;
if (d_len > longest) if (d_len > longest)
longest = (d_len > COLS - 1) ? COLS - 1 : d_len; longest = (d_len > COLS - 1) ? COLS - 1 : d_len;
} }