Fix replace abort moves cursor ahead one space
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@300 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
ac0e63aa89
Коммит
aaabe1f865
@ -1,4 +1,7 @@
|
|||||||
CVS code -
|
CVS code -
|
||||||
|
- search.c:
|
||||||
|
findnextstr()
|
||||||
|
- Set current_x back before aborting (oops!).
|
||||||
|
|
||||||
nano 0.9.20 - 11/18/2000
|
nano 0.9.20 - 11/18/2000
|
||||||
- General
|
- General
|
||||||
|
28
po/nano.pot
28
po/nano.pot
@ -6,7 +6,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"POT-Creation-Date: 2000-11-17 22:07-0500\n"
|
"POT-Creation-Date: 2000-11-19 13:19-0500\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@ -751,7 +751,7 @@ msgstr ""
|
|||||||
msgid " (to replace)"
|
msgid " (to replace)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:136 search.c:318
|
#: search.c:136 search.c:322
|
||||||
msgid "Search Cancelled"
|
msgid "Search Cancelled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@ -760,54 +760,54 @@ msgstr ""
|
|||||||
msgid "\"%s...\" not found"
|
msgid "\"%s...\" not found"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:243
|
#: search.c:245
|
||||||
msgid "Search Wrapped"
|
msgid "Search Wrapped"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:340
|
#: search.c:344
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Replaced %d occurences"
|
msgid "Replaced %d occurences"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:342
|
#: search.c:346
|
||||||
msgid "Replaced 1 occurence"
|
msgid "Replaced 1 occurence"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:479 search.c:572 search.c:588
|
#: search.c:483 search.c:576 search.c:592
|
||||||
msgid "Replace Cancelled"
|
msgid "Replace Cancelled"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:522
|
#: search.c:526
|
||||||
msgid "Replace this instance?"
|
msgid "Replace this instance?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:530
|
#: search.c:534
|
||||||
msgid "Replace failed: unknown subexpression!"
|
msgid "Replace failed: unknown subexpression!"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:613
|
#: search.c:617
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Replace with [%s]"
|
msgid "Replace with [%s]"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:617 search.c:621
|
#: search.c:621 search.c:625
|
||||||
msgid "Replace with"
|
msgid "Replace with"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Ask for it
|
#. Ask for it
|
||||||
#: search.c:656
|
#: search.c:660
|
||||||
msgid "Enter line number"
|
msgid "Enter line number"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:658
|
#: search.c:662
|
||||||
msgid "Aborted"
|
msgid "Aborted"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:678
|
#: search.c:682
|
||||||
msgid "Come on, be reasonable"
|
msgid "Come on, be reasonable"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: search.c:683
|
#: search.c:687
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Only %d lines available, skipping to last line"
|
msgid "Only %d lines available, skipping to last line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
10
search.c
10
search.c
@ -213,7 +213,7 @@ filestruct *findnextstr(int quiet, filestruct * begin, int beginx,
|
|||||||
search_last_line = 1;
|
search_last_line = 1;
|
||||||
|
|
||||||
/* Make sure we haven't passed the end of the string */
|
/* Make sure we haven't passed the end of the string */
|
||||||
if (strlen(fileptr->data) < current_x)
|
if (strlen(fileptr->data) + 1 < current_x)
|
||||||
current_x--;
|
current_x--;
|
||||||
|
|
||||||
searchstr = &fileptr->data[current_x];
|
searchstr = &fileptr->data[current_x];
|
||||||
@ -223,8 +223,10 @@ filestruct *findnextstr(int quiet, filestruct * begin, int beginx,
|
|||||||
|
|
||||||
/* finished processing file, get out */
|
/* finished processing file, get out */
|
||||||
if (search_last_line) {
|
if (search_last_line) {
|
||||||
if (!quiet)
|
if (!quiet) {
|
||||||
not_found_msg(needle);
|
not_found_msg(needle);
|
||||||
|
current_x--;
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,8 +260,10 @@ filestruct *findnextstr(int quiet, filestruct * begin, int beginx,
|
|||||||
|
|
||||||
/* Ensure we haven't wrap around again! */
|
/* Ensure we haven't wrap around again! */
|
||||||
if ((search_last_line) && (current_x >= beginx)) {
|
if ((search_last_line) && (current_x >= beginx)) {
|
||||||
if (!quiet)
|
if (!quiet) {
|
||||||
not_found_msg(needle);
|
not_found_msg(needle);
|
||||||
|
current_x--;
|
||||||
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user