From: David Lawrence Ramsey Date: Sun, 28 Dec 2003 03:56:04 +0000 (+0000) Subject: comment addition, minor cosmetic fixes X-Git-Tag: v1.3.1~9 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=32559294e8bc54e81f6b1a0c4bb2fb3ecf5ce501;p=nano.git comment addition, minor cosmetic fixes git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1605 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index b2e5ed23..5ff94c9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -64,7 +64,11 @@ CVS code - - global.c: shortcut_init() - Allow WHEREIS_NEXT_KEY to be used in view mode. (DLR) -- nano,c: +- nano.c: + do_int_spell_fix() + - Add comment explaining why findnextstr() is called with + bracket_mode set to TRUE even though we aren't doing a bracket + search. (DLR) do_para_operation() - Convert to use the new low-level input functions. (DLR) main() diff --git a/src/nano.c b/src/nano.c index 351125ee..484edc5f 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1566,7 +1566,9 @@ int do_int_spell_fix(const char *word) search_last_line = FALSE; - /* We find the first whole-word occurrence of word. */ + /* We find the first whole-word occurrence of word. We call + findnextstr() with bracket_mode set to TRUE in order to disable + search wrapping. */ while (findnextstr(TRUE, TRUE, fileage, -1, word, 0)) if (is_whole_word(current_x, current->data, word)) { edit_refresh(); diff --git a/src/search.c b/src/search.c index ef1ea8f1..8b1c9f76 100644 --- a/src/search.c +++ b/src/search.c @@ -986,7 +986,7 @@ int do_find_bracket(void) while (1) { search_last_line = 0; - if (findnextstr(1, 1, current, current_x, regexp_pat, 0) != NULL) { + if (findnextstr(TRUE, TRUE, current, current_x, regexp_pat, 0) != NULL) { have_search_offscreen |= search_offscreen; /* found identical bracket */