tweaks: rename a constant, to match what it actually means

Wrapping is concerned with columns, not with number of characters.
master
Benno Schulenberg 2018-08-04 11:21:42 +02:00
parent 157c7b1bc4
commit bb90de0eb4
3 changed files with 5 additions and 8 deletions

View File

@ -80,10 +80,8 @@ int shiftaltleft, shiftaltright, shiftaltup, shiftaltdown;
#ifdef ENABLED_WRAPORJUSTIFY
ssize_t fill = 0;
/* The column where we will wrap lines. */
ssize_t wrap_at = -CHARS_FROM_EOL;
/* The position where we will wrap lines. fill is equal to this
* if it's greater than zero, and equal to (COLS + this) if it
* isn't. */
ssize_t wrap_at = -COLUMNS_FROM_EOL;
/* The column where we will wrap lines. */
#endif
char *last_search = NULL;

View File

@ -630,9 +630,8 @@ enum
/* The maximum number of entries displayed in the main shortcut list. */
#define MAIN_VISIBLE (((COLS + 40) / 20) * 2)
/* The default number of characters from the end of the line where
* wrapping occurs. */
#define CHARS_FROM_EOL 8
/* The default number of columns from end of line where wrapping occurs. */
#define COLUMNS_FROM_EOL 8
/* The default width of a tab in spaces. */
#define WIDTH_OF_TAB 8

View File

@ -1105,7 +1105,7 @@ void parse_rcfile(FILE *rcstream, bool syntax_only)
if (!parse_num(option, &wrap_at)) {
rcfile_error(N_("Requested fill size \"%s\" is invalid"),
option);
wrap_at = -CHARS_FROM_EOL;
wrap_at = -COLUMNS_FROM_EOL;
} else
UNSET(NO_WRAP);
free(option);