tweaks: reshuffle some lines after the previous change

This commit is contained in:
Benno Schulenberg 2020-10-03 11:58:43 +02:00
parent 2e9fb7d840
commit d26916199b
2 changed files with 15 additions and 19 deletions

View File

@ -2127,9 +2127,9 @@ int main(int argc, char **argv)
ssize_t fill_cmdline = fill;
#endif
#ifndef NANO_TINY
size_t stripeclm_cmdline = stripe_column;
char *backup_dir_cmdline = backup_dir;
char *word_chars_cmdline = word_chars;
size_t stripeclm_cmdline = stripe_column;
ssize_t tabsize_cmdline = tabsize;
#endif
#ifdef ENABLE_OPERATINGDIR
@ -2169,8 +2169,6 @@ int main(int argc, char **argv)
fill = fill_cmdline;
#endif
#ifndef NANO_TINY
if (stripeclm_cmdline > 0)
stripe_column = stripeclm_cmdline;
if (backup_dir_cmdline != NULL) {
free(backup_dir);
backup_dir = backup_dir_cmdline;
@ -2179,6 +2177,8 @@ int main(int argc, char **argv)
free(word_chars);
word_chars = word_chars_cmdline;
}
if (stripeclm_cmdline > 0)
stripe_column = stripeclm_cmdline;
if (tabsize_cmdline != -1)
tabsize = tabsize_cmdline;
#endif

View File

@ -1585,13 +1585,7 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
} else
#endif
#ifndef NANO_TINY
if (strcmp(option, "guidestripe") == 0) {
if (!parse_num(argument, &stripe_column) || stripe_column <= 0) {
jot_error(N_("Guide column \"%s\" is invalid"), argument);
stripe_column = 0;
}
free(argument);
} else if (strcmp(option, "matchbrackets") == 0) {
if (strcmp(option, "matchbrackets") == 0) {
if (has_blank_char(argument)) {
jot_error(N_("Non-blank characters required"));
free(argument);
@ -1628,21 +1622,23 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
quotestr = argument;
else
#endif
#ifndef NANO_TINY
if (strcmp(option, "backupdir") == 0)
backup_dir = argument;
else
if (strcmp(option, "wordchars") == 0)
word_chars = argument;
else
#endif
#ifdef ENABLE_SPELLER
if (strcmp(option, "speller") == 0)
alt_speller = argument;
else
#endif
#ifndef NANO_TINY
if (strcmp(option, "tabsize") == 0) {
if (strcmp(option, "backupdir") == 0)
backup_dir = argument;
else if (strcmp(option, "wordchars") == 0)
word_chars = argument;
else if (strcmp(option, "guidestripe") == 0) {
if (!parse_num(argument, &stripe_column) || stripe_column <= 0) {
jot_error(N_("Guide column \"%s\" is invalid"), argument);
stripe_column = 0;
}
free(argument);
} else if (strcmp(option, "tabsize") == 0) {
if (!parse_num(argument, &tabsize) || tabsize <= 0) {
jot_error(N_("Requested tab size \"%s\" is invalid"), argument);
tabsize = -1;