diff --git a/ChangeLog b/ChangeLog index 9ab2643a6e623869ad7cf11fa29fe2af2a05c90f..7e304ce12acc5581e9bc355444bca913ebd114e6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -240,6 +240,9 @@ CVS code - - rcfile.c: - Move "rebinddelete" up in the list of options so that the list is in alphabetical order. (DLR) + - Explicitly check for rcopts[i].name's being "tabsize" to avoid + a spurious error under some circumstances about tabsize's + being 0 when there's no tabsize entry in the rcfile. (DLR) - search.c: regexp_init() - Overhaul for efficiency. Also check if regcomp() failed, and diff --git a/src/nano.c b/src/nano.c index 99c0a2fedf617ca2a0275b0e0114ccb727a5f31b..3cec1a254dbb6a05bc188e5fb75193372c2bbe8f 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1290,8 +1290,8 @@ int do_wrap(filestruct *inptr) * such that the last word before it ended at or before fill. If there * is no such point, we settle for the first legal wrap point. * - * A "legal wrap point" is a white-space character that is not followed by - * white-space. + * A "legal wrap point" is a whitespace character that is not followed + * by whitespace. * * If there is no legal wrap point or we found the last character of the * line, we should return without wrapping. @@ -1299,8 +1299,8 @@ int do_wrap(filestruct *inptr) * Note that the initial indentation does not count as a legal wrap * point if we are going to auto-indent! * - * Note that the code below could be optimised, by not calling strnlenpt() - * so often. */ + * Note that the code below could be optimized, by not calling + * strnlenpt() so often. */ #ifndef NANO_SMALL if (ISSET(AUTOINDENT)) @@ -1874,8 +1874,8 @@ int do_spell(void) #endif /* !DISABLE_SPELLER */ #if !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY) -/* The "indentation" of a line is the white-space between the quote part - * and the non-white-space of the line. */ +/* The "indentation" of a line is the whitespace between the quote part + * and the non-whitespace of the line. */ size_t indent_length(const char *line) { size_t len = 0; diff --git a/src/rcfile.c b/src/rcfile.c index fa99dcee27e21eda2f585dc69682bee7b440208d..a40b6fc187556c3988aafb2594e331cf2ccd7f14 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -637,7 +637,7 @@ void parse_rcfile(FILE *rcstream) alt_speller = mallocstrcpy(NULL, option); else #endif - { + if (!strcasecmp(rcopts[i].name, "tabsize")) { char *first_error; /* Using strtol instead of atoi lets us