Commit 8125e08b authored by David Lawrence Ramsey's avatar David Lawrence Ramsey
Browse files

miscellaneous comment fixes

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3969 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 16 additions and 12 deletions
+16 -12
CVS code - CVS code -
- General:
- Miscellaneous comment fixes. (DLR)
- nano.h: - nano.h:
- Rename NANO_ALT_REPLACE_KEY to NANO_REPLACE_ALTKEY, for - Rename NANO_ALT_REPLACE_KEY to NANO_REPLACE_ALTKEY, for
consistency. (DLR) consistency. (DLR)
......
...@@ -621,19 +621,20 @@ void browser_refresh(void) ...@@ -621,19 +621,20 @@ void browser_refresh(void)
/* The length of the file information in columns. */ /* The length of the file information in columns. */
int foomaxlen = 7; int foomaxlen = 7;
/* The maximum length of the file information in /* The maximum length of the file information in
* columns: 7 for "--", "(dir)", or the file size, and * columns: seven for "--", "(dir)", or the file size,
* 12 for "(parent dir)". */ * and 12 for "(parent dir)". */
bool dots = (COLS >= 15 && filetaillen >= longest - bool dots = (COLS >= 15 && filetaillen >= longest -
foomaxlen - 1); foomaxlen - 1);
/* Do we put an ellipsis before the filename? Don't set /* Do we put an ellipsis before the filename? Don't set
* this to TRUE if we have fewer than 15 columns (i.e. 1 * this to TRUE if we have fewer than 15 columns (i.e.
* column for padding, plus 7 columns for a filename * one column for padding, plus seven columns for a
* other than ".."). */ * filename other than ".."). */
char *disp = display_string(filetail, dots ? filetaillen - char *disp = display_string(filetail, dots ? filetaillen -
longest + foomaxlen + 4 : 0, longest, FALSE); longest + foomaxlen + 4 : 0, longest, FALSE);
/* If we put an ellipsis before the filename, reserve 1 /* If we put an ellipsis before the filename, reserve
* column for padding, plus 7 columns for "--", "(dir)", * one column for padding, plus seven columns for "--",
* or the file size, plus 3 columns for the ellipsis. */ * "(dir)", or the file size, plus three columns for the
* ellipsis. */
/* Start highlighting the currently selected file or /* Start highlighting the currently selected file or
* directory. */ * directory. */
......
...@@ -609,8 +609,8 @@ size_t help_line_len(const char *ptr) ...@@ -609,8 +609,8 @@ size_t help_line_len(const char *ptr)
while (*(ptr + retval) != '\0' && *(ptr + retval) != '\n') while (*(ptr + retval) != '\0' && *(ptr + retval) != '\n')
retval += move_mbright(ptr + retval, 0); retval += move_mbright(ptr + retval, 0);
/* If the entire line doesn't go more than 1 column beyond where we /* If the entire line doesn't go more than one column beyond where
* tried to break it, we should display it as-is. Otherwise, we * we tried to break it, we should display it as-is. Otherwise, we
* should display it only up to the break. */ * should display it only up to the break. */
if (strnlenpt(ptr, retval) > help_cols + 1) if (strnlenpt(ptr, retval) > help_cols + 1)
retval = retval_save; retval = retval_save;
......
...@@ -2095,8 +2095,9 @@ void titlebar(const char *path) ...@@ -2095,8 +2095,9 @@ void titlebar(const char *path)
if (!newfie) { if (!newfie) {
size_t lenpt = strlenpt(path), start_col; size_t lenpt = strlenpt(path), start_col;
/* Don't set dots to TRUE if we have fewer than 8 columns (i.e. /* Don't set dots to TRUE if we have fewer than eight columns
* 1 column for padding, plus 7 columns for a filename). */ * (i.e. one column for padding, plus seven columns for a
* filename). */
dots = (space >= 8 && lenpt >= space); dots = (space >= 8 && lenpt >= space);
if (dots) { if (dots) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment