mirror of git://git.sv.gnu.org/nano.git
Added checks for deleting search string when there was a previous value
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@251 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
105da33276
commit
86f8b3a163
20
po/nano.pot
20
po/nano.pot
|
@ -6,7 +6,7 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2000-10-31 00:04-0500\n"
|
||||
"POT-Creation-Date: 2000-10-31 00:28-0500\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"
|
||||
|
@ -765,41 +765,41 @@ msgstr ""
|
|||
msgid "Search Wrapped"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:258
|
||||
#: search.c:266
|
||||
#, c-format
|
||||
msgid "Replaced %d occurences"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:260
|
||||
#: search.c:268
|
||||
msgid "Replaced 1 occurence"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:396 search.c:427
|
||||
#: search.c:404 search.c:420 search.c:442
|
||||
msgid "Replace Cancelled"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:421
|
||||
#: search.c:436
|
||||
msgid "Replace with"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:461
|
||||
#: search.c:476
|
||||
msgid "Replace this instance?"
|
||||
msgstr ""
|
||||
|
||||
#. Ask for it
|
||||
#: search.c:522
|
||||
#: search.c:537
|
||||
msgid "Enter line number"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:524
|
||||
#: search.c:539
|
||||
msgid "Aborted"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:544
|
||||
#: search.c:559
|
||||
msgid "Come on, be reasonable"
|
||||
msgstr ""
|
||||
|
||||
#: search.c:549
|
||||
#: search.c:564
|
||||
#, c-format
|
||||
msgid "Only %d lines available, skipping to last line"
|
||||
msgstr ""
|
||||
|
|
15
search.c
15
search.c
|
@ -246,6 +246,14 @@ int do_search(void)
|
|||
search_abort();
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* The sneaky user deleted the previous search string */
|
||||
if (!strcmp(answer, "")) {
|
||||
statusbar("Search Cancelled");
|
||||
search_abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
search_last_line = 0;
|
||||
findnextstr(0, current, current_x, answer);
|
||||
search_abort();
|
||||
|
@ -407,6 +415,13 @@ int do_replace(void)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* Again, there was a previous string but they deleted it and hit enter */
|
||||
if (!strcmp(answer, "")) {
|
||||
statusbar(_("Replace Cancelled"));
|
||||
replace_abort();
|
||||
return 0;
|
||||
}
|
||||
|
||||
strncpy(prevanswer, answer, 132);
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue