diff --git a/src/global.c b/src/global.c index a27aec0f..32c3714a 100644 --- a/src/global.c +++ b/src/global.c @@ -78,9 +78,7 @@ int shiftaltleft, shiftaltright, shiftaltup, shiftaltdown; #endif #ifdef ENABLED_WRAPORJUSTIFY -ssize_t fill = 0; - /* The column where we will wrap lines. */ -ssize_t wrap_at = -COLUMNS_FROM_EOL; +ssize_t fill = -COLUMNS_FROM_EOL; /* The column where we will wrap lines. */ #endif diff --git a/src/nano.c b/src/nano.c index fe156ec8..0df5253b 100644 --- a/src/nano.c +++ b/src/nano.c @@ -718,7 +718,6 @@ void window_init(void) #ifdef ENABLED_WRAPORJUSTIFY /* Set up the wrapping point, accounting for screen width when negative. */ - fill = wrap_at; if (fill <= 0) fill += COLS; if (fill < 0) @@ -2246,7 +2245,7 @@ int main(int argc, char **argv) #endif #ifdef ENABLED_WRAPORJUSTIFY case 'r': - if (!parse_num(optarg, &wrap_at)) { + if (!parse_num(optarg, &fill)) { fprintf(stderr, _("Requested fill size \"%s\" is invalid"), optarg); fprintf(stderr, "\n"); exit(1); @@ -2334,7 +2333,7 @@ int main(int argc, char **argv) char *operating_dir_cpy = operating_dir; #endif #ifdef ENABLED_WRAPORJUSTIFY - ssize_t wrap_at_cpy = wrap_at; + ssize_t fill_cpy = fill; #endif #ifndef NANO_TINY char *backup_dir_cpy = backup_dir; @@ -2382,7 +2381,7 @@ int main(int argc, char **argv) #endif #ifdef ENABLED_WRAPORJUSTIFY if (fill_used) - wrap_at = wrap_at_cpy; + fill = fill_cpy; #endif #ifndef NANO_TINY if (backup_dir_cpy != NULL) { diff --git a/src/proto.h b/src/proto.h index 6ae51ad3..e9cc8d9b 100644 --- a/src/proto.h +++ b/src/proto.h @@ -81,7 +81,6 @@ extern int shiftaltdown; #ifdef ENABLED_WRAPORJUSTIFY extern ssize_t fill; -extern ssize_t wrap_at; #endif extern char *last_search; diff --git a/src/rcfile.c b/src/rcfile.c index 6c9738ad..e9470c58 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -1102,10 +1102,10 @@ void parse_rcfile(FILE *rcstream, bool syntax_only) #endif #ifdef ENABLED_WRAPORJUSTIFY if (strcasecmp(rcopts[i].name, "fill") == 0) { - if (!parse_num(option, &wrap_at)) { + if (!parse_num(option, &fill)) { rcfile_error(N_("Requested fill size \"%s\" is invalid"), option); - wrap_at = -COLUMNS_FROM_EOL; + fill = -COLUMNS_FROM_EOL; } else UNSET(NO_WRAP); free(option);