diff --git a/ChangeLog b/ChangeLog index ec29716eea164cf0468c3e4219e78632e6f2d870..e01a4fed5091cfcc976a61f770bad3f0c16ece91 100644 --- a/ChangeLog +++ b/ChangeLog @@ -88,7 +88,8 @@ CVS code - make some of them more consistent. (David Benbennick and DLR) - Change some functions to take const char*'s instead of char*'s where possible. (David Benbennick) - - Tweak some #ifdefs to avoid warnings when compiling with + - Tweak some #ifdefs around indent_length() and references to + fill_flag_used to avoid warnings when compiling with --disable-wrapping, --disable-justify, or a combination of the two. (DLR) - files.c: diff --git a/src/nano.c b/src/nano.c index 10153caf55cb3f8d1aaeb4d99269c47bffe7a2d5..07ca0c16c211e219037f9e23dcd67c6b89bf3429 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1879,8 +1879,9 @@ size_t indent_length(const char *line) #ifndef DISABLE_JUSTIFY /* justify_format() replaces Tab by Space and multiple spaces by 1 - * (except it maintains 2 after a . ! or ?). Note the terminating \0 - * counts as a space. + * (except it maintains 2 after a character in punct followed by a + * character in brackets). Note that the terminating \0 counts as a + * space. * * justify_format() might make line->data shorter, and change the actual * pointer with null_at(). @@ -2257,7 +2258,7 @@ bool do_para_search(size_t *const quote, size_t *const par) while (current->prev != NULL && quotes_match(current->data, quote_len, current->prev->data)) { size_t temp_id_len = - indent_length(current->prev->data + quote_len); + indent_length(current->prev->data + quote_len); /* The indentation length of the previous line. */ /* Is this line the beginning of a paragraph, according to diff --git a/src/proto.h b/src/proto.h index 141040cc42edf84273efdde1bb36b04c24e8905e..3ec5e3d9c2f0995c04d2ca9075359c35e7e1a7ad 100644 --- a/src/proto.h +++ b/src/proto.h @@ -321,7 +321,7 @@ const char *do_int_speller(const char *tempfile_name); const char *do_alt_speller(char *tempfile_name); void do_spell(void); #endif -#if !defined(DISABLE_WRAPPING) && !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY) +#if !defined(NANO_SMALL) || !defined(DISABLE_JUSTIFY) size_t indent_length(const char *line); #endif #ifndef DISABLE_JUSTIFY