mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 06:09:38 +03:00
findnextstr() - Fixed check for string that only occurs on the same line failing
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@189 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
340d6e50c2
commit
9babaf3b38
@ -18,6 +18,8 @@ CVS Code
|
||||
ugliness bug (reported by Ken Tyler).
|
||||
findnextstr():
|
||||
- Added reset for placewewant (Ben Roberts).
|
||||
- Fixed check for string that only occurs on the same line failing
|
||||
(discovered by Ken Tyler).
|
||||
|
||||
nano-0.9.16 - 08/09/2000
|
||||
- cut.c:
|
||||
|
24
po/nano.pot
24
po/nano.pot
@ -6,7 +6,7 @@
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2000-08-28 23:58-0400\n"
|
||||
"POT-Creation-Date: 2000-08-30 09:55-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -32,7 +32,7 @@ msgstr ""
|
||||
msgid "Read %d lines"
|
||||
msgstr ""
|
||||
|
||||
#: files.c:217 search.c:174 search.c:192
|
||||
#: files.c:217 search.c:174
|
||||
#, c-format
|
||||
msgid "\"%s\" not found"
|
||||
msgstr ""
|
||||
@ -691,47 +691,47 @@ msgstr ""
|
||||
msgid "Search Wrapped"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:244
|
||||
#: search.c:239
|
||||
#, c-format
|
||||
msgid "Replaced %d occurences"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:246
|
||||
#: search.c:241
|
||||
msgid "Replaced 1 occurence"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:381 search.c:402 search.c:425
|
||||
#: search.c:376 search.c:397 search.c:420
|
||||
msgid "Replace Cancelled"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:398
|
||||
#: search.c:393
|
||||
#, c-format
|
||||
msgid "Replace with [%s]"
|
||||
msgstr ""
|
||||
|
||||
#. last_search is empty
|
||||
#: search.c:423
|
||||
#: search.c:418
|
||||
msgid "Replace with"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:464
|
||||
#: search.c:459
|
||||
msgid "Replace this instance?"
|
||||
msgstr ""
|
||||
|
||||
#. Ask for it
|
||||
#: search.c:515
|
||||
#: search.c:510
|
||||
msgid "Enter line number"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:517
|
||||
#: search.c:512
|
||||
msgid "Aborted"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:537
|
||||
#: search.c:532
|
||||
msgid "Come on, be reasonable"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:542
|
||||
#: search.c:537
|
||||
#, c-format
|
||||
msgid "Only %d lines available, skipping to last line"
|
||||
msgstr ""
|
||||
|
15
search.c
15
search.c
@ -131,7 +131,7 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle)
|
||||
char *searchstr, *found = NULL, *tmp;
|
||||
int past_editbot = 0;
|
||||
|
||||
fileptr = current;
|
||||
fileptr = begin;
|
||||
|
||||
searchstr = ¤t->data[current_x + 1];
|
||||
/* Look for searchstr until EOF */
|
||||
@ -165,17 +165,17 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle)
|
||||
|
||||
fileptr = fileage;
|
||||
|
||||
while (fileptr != current && fileptr != begin &&
|
||||
while (fileptr != begin->next &&
|
||||
(found = strstrwrapper(fileptr->data, needle)) == NULL)
|
||||
fileptr = fileptr->next;
|
||||
|
||||
if (fileptr == begin) {
|
||||
if (fileptr == begin->next) {
|
||||
if (!quiet)
|
||||
statusbar(_("\"%s\" not found"), needle);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
if (fileptr != current) { /* We found something */
|
||||
else { /* We found something */
|
||||
current = fileptr;
|
||||
current_x = 0;
|
||||
for (tmp = fileptr->data; tmp != found; tmp++)
|
||||
@ -186,12 +186,7 @@ filestruct *findnextstr(int quiet, filestruct * begin, char *needle)
|
||||
|
||||
if (!quiet)
|
||||
statusbar(_("Search Wrapped"));
|
||||
} else { /* Nada */
|
||||
|
||||
if (!quiet)
|
||||
statusbar(_("\"%s\" not found"), needle);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return fileptr;
|
||||
|
Loading…
Reference in New Issue
Block a user