Oops, fix answer getting borked when using shortcuts at statusbar and nothing's typed

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@258 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2000-11-02 05:10:26 +00:00
parent 31925e4517
commit f5deac3d0f
3 changed files with 26 additions and 35 deletions

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2000-11-01 23:34-0500\n"
"POT-Creation-Date: 2000-11-02 00:10-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"
@ -380,7 +380,7 @@ msgid "Case Sens"
msgstr ""
#: global.c:344 global.c:364 global.c:375 global.c:385 global.c:401
#: global.c:405 global.c:411 winio.c:982
#: global.c:405 global.c:411 winio.c:981
msgid "Cancel"
msgstr ""
@ -775,36 +775,36 @@ msgstr ""
msgid "Replaced 1 occurence"
msgstr ""
#: search.c:426 search.c:442 search.c:464
#: search.c:426 search.c:442 search.c:456
msgid "Replace Cancelled"
msgstr ""
#: search.c:458
#: search.c:450
msgid "Replace with"
msgstr ""
#: search.c:495
#: search.c:487
msgid "Replace this instance?"
msgstr ""
#: search.c:503
#: search.c:495
msgid "Replace failed: unknown subexpression!"
msgstr ""
#. Ask for it
#: search.c:556
#: search.c:548
msgid "Enter line number"
msgstr ""
#: search.c:558
#: search.c:550
msgid "Aborted"
msgstr ""
#: search.c:578
#: search.c:570
msgid "Come on, be reasonable"
msgstr ""
#: search.c:583
#: search.c:575
#, c-format
msgid "Only %d lines available, skipping to last line"
msgstr ""
@ -819,62 +819,62 @@ msgstr ""
msgid "input '%c' (%d)\n"
msgstr ""
#: winio.c:435
#: winio.c:434
msgid "New Buffer"
msgstr ""
#: winio.c:438
#: winio.c:437
msgid " File: ..."
msgstr ""
#: winio.c:446
#: winio.c:445
msgid "Modified"
msgstr ""
#: winio.c:898
#: winio.c:897
#, c-format
msgid "Moved to (%d, %d) in edit buffer\n"
msgstr ""
#: winio.c:909
#: winio.c:908
#, c-format
msgid "current->data = \"%s\"\n"
msgstr ""
#: winio.c:952
#: winio.c:951
#, c-format
msgid "I got \"%s\"\n"
msgstr ""
#: winio.c:977
#: winio.c:976
msgid "Yes"
msgstr ""
#: winio.c:979
#: winio.c:978
msgid "All"
msgstr ""
#: winio.c:981
#: winio.c:980
msgid "No"
msgstr ""
#: winio.c:1118
#: winio.c:1117
#, c-format
msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
msgstr ""
#: winio.c:1122
#: winio.c:1121
msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)"
msgstr ""
#: winio.c:1250
#: winio.c:1249
msgid "Dumping file buffer to stderr...\n"
msgstr ""
#: winio.c:1252
#: winio.c:1251
msgid "Dumping cutbuffer to stderr...\n"
msgstr ""
#: winio.c:1254
#: winio.c:1253
msgid "Dumping a buffer to stderr...\n"
msgstr ""

View File

@ -446,14 +446,6 @@ int do_replace(void)
prevanswer = mallocstrcpy(prevanswer, answer);
/*
if (strcmp(last_replace, "")) * There's a previous replace str *
i = statusq(replace_list_2, REPLACE_LIST_2_LEN, "",
_("Replace with [%s]"), last_replace);
else
i = statusq(replace_list_2, REPLACE_LIST_2_LEN, "", _("Replace with"));
*/
i = statusq(replace_list_2, REPLACE_LIST_2_LEN, last_replace,
_("Replace with"));

View File

@ -258,7 +258,7 @@ int nanogetstr(char *buf, char *def, shortcut s[], int slen, int start_x)
while ((kbinput = wgetch(bottomwin)) != 13) {
for (j = 0; j <= slen - 1; j++) {
if (kbinput == s[j].val) {
strcpy(answer, "");
answer = mallocstrcpy(answer, "");
return s[j].val;
}
}
@ -405,7 +405,6 @@ int nanogetstr(char *buf, char *def, shortcut s[], int slen, int start_x)
/* Now that the text is editable instead of bracketed, we have to
check for answer == def, instead of answer == "" */
/* if (!strcmp(answer, "")) */
if (!strcmp(answer, def))
return -2;
else