tweaks: reshuffle some lines after the previous change
parent
2e9fb7d840
commit
d26916199b
|
@ -2127,9 +2127,9 @@ int main(int argc, char **argv)
|
||||||
ssize_t fill_cmdline = fill;
|
ssize_t fill_cmdline = fill;
|
||||||
#endif
|
#endif
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
size_t stripeclm_cmdline = stripe_column;
|
|
||||||
char *backup_dir_cmdline = backup_dir;
|
char *backup_dir_cmdline = backup_dir;
|
||||||
char *word_chars_cmdline = word_chars;
|
char *word_chars_cmdline = word_chars;
|
||||||
|
size_t stripeclm_cmdline = stripe_column;
|
||||||
ssize_t tabsize_cmdline = tabsize;
|
ssize_t tabsize_cmdline = tabsize;
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_OPERATINGDIR
|
#ifdef ENABLE_OPERATINGDIR
|
||||||
|
@ -2169,8 +2169,6 @@ int main(int argc, char **argv)
|
||||||
fill = fill_cmdline;
|
fill = fill_cmdline;
|
||||||
#endif
|
#endif
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (stripeclm_cmdline > 0)
|
|
||||||
stripe_column = stripeclm_cmdline;
|
|
||||||
if (backup_dir_cmdline != NULL) {
|
if (backup_dir_cmdline != NULL) {
|
||||||
free(backup_dir);
|
free(backup_dir);
|
||||||
backup_dir = backup_dir_cmdline;
|
backup_dir = backup_dir_cmdline;
|
||||||
|
@ -2179,6 +2177,8 @@ int main(int argc, char **argv)
|
||||||
free(word_chars);
|
free(word_chars);
|
||||||
word_chars = word_chars_cmdline;
|
word_chars = word_chars_cmdline;
|
||||||
}
|
}
|
||||||
|
if (stripeclm_cmdline > 0)
|
||||||
|
stripe_column = stripeclm_cmdline;
|
||||||
if (tabsize_cmdline != -1)
|
if (tabsize_cmdline != -1)
|
||||||
tabsize = tabsize_cmdline;
|
tabsize = tabsize_cmdline;
|
||||||
#endif
|
#endif
|
||||||
|
|
28
src/rcfile.c
28
src/rcfile.c
|
@ -1585,13 +1585,7 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
if (strcmp(option, "guidestripe") == 0) {
|
if (strcmp(option, "matchbrackets") == 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 (has_blank_char(argument)) {
|
if (has_blank_char(argument)) {
|
||||||
jot_error(N_("Non-blank characters required"));
|
jot_error(N_("Non-blank characters required"));
|
||||||
free(argument);
|
free(argument);
|
||||||
|
@ -1628,21 +1622,23 @@ void parse_rcfile(FILE *rcstream, bool just_syntax, bool intros_only)
|
||||||
quotestr = argument;
|
quotestr = argument;
|
||||||
else
|
else
|
||||||
#endif
|
#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
|
#ifdef ENABLE_SPELLER
|
||||||
if (strcmp(option, "speller") == 0)
|
if (strcmp(option, "speller") == 0)
|
||||||
alt_speller = argument;
|
alt_speller = argument;
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
#ifndef NANO_TINY
|
#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) {
|
if (!parse_num(argument, &tabsize) || tabsize <= 0) {
|
||||||
jot_error(N_("Requested tab size \"%s\" is invalid"), argument);
|
jot_error(N_("Requested tab size \"%s\" is invalid"), argument);
|
||||||
tabsize = -1;
|
tabsize = -1;
|
||||||
|
|
Loading…
Reference in New Issue