miscellaneous minor fixes
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3745 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
051e953f17
commit
4953e49d92
|
@ -436,10 +436,10 @@ char *do_browse_from(const char *inpath)
|
||||||
|
|
||||||
/* Set filelist to the list of files contained in the directory path,
|
/* Set filelist to the list of files contained in the directory path,
|
||||||
* set filelist_len to the number of files in that list, set longest to
|
* set filelist_len to the number of files in that list, set longest to
|
||||||
* the width in columns of the longest filename in that list (at least
|
* the width in columns of the longest filename in that list (between 15
|
||||||
* 15 and at most COLS), and set width to the number of files that we
|
* and COLS, and at least 15), and set width to the number of files that
|
||||||
* can display per line. longest needs to be at least 15 columns in
|
* we can display per line. longest needs to be at least 15 columns in
|
||||||
* order to hold ".. (parent dir)", as Pico does. Assume path exists
|
* order to display ".. (parent dir)", as Pico does. Assume path exists
|
||||||
* and is a directory. */
|
* and is a directory. */
|
||||||
void browser_init(const char *path, DIR *dir)
|
void browser_init(const char *path, DIR *dir)
|
||||||
{
|
{
|
||||||
|
@ -504,11 +504,11 @@ void browser_init(const char *path, DIR *dir)
|
||||||
|
|
||||||
closedir(dir);
|
closedir(dir);
|
||||||
|
|
||||||
/* Make sure longest is between 15 and COLS. */
|
/* Make sure longest is between 15 and COLS, and at least 15. */
|
||||||
if (longest < 15)
|
|
||||||
longest = 15;
|
|
||||||
if (longest > COLS)
|
if (longest > COLS)
|
||||||
longest = COLS;
|
longest = COLS;
|
||||||
|
if (longest < 15)
|
||||||
|
longest = 15;
|
||||||
|
|
||||||
/* Set width to zero, just before we initialize it. */
|
/* Set width to zero, just before we initialize it. */
|
||||||
width = 0;
|
width = 0;
|
||||||
|
|
Loading…
Reference in New Issue