Commit f5deac3d authored by Chris Allegretta's avatar Chris Allegretta
Browse files

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
No related merge requests found
Showing with 26 additions and 35 deletions
+26 -35
...@@ -6,7 +6,7 @@ ...@@ -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-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" "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"
...@@ -380,7 +380,7 @@ msgid "Case Sens" ...@@ -380,7 +380,7 @@ msgid "Case Sens"
msgstr "" msgstr ""
#: global.c:344 global.c:364 global.c:375 global.c:385 global.c:401 #: 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" msgid "Cancel"
msgstr "" msgstr ""
...@@ -775,36 +775,36 @@ msgstr "" ...@@ -775,36 +775,36 @@ msgstr ""
msgid "Replaced 1 occurence" msgid "Replaced 1 occurence"
msgstr "" msgstr ""
#: search.c:426 search.c:442 search.c:464 #: search.c:426 search.c:442 search.c:456
msgid "Replace Cancelled" msgid "Replace Cancelled"
msgstr "" msgstr ""
#: search.c:458 #: search.c:450
msgid "Replace with" msgid "Replace with"
msgstr "" msgstr ""
#: search.c:495 #: search.c:487
msgid "Replace this instance?" msgid "Replace this instance?"
msgstr "" msgstr ""
#: search.c:503 #: search.c:495
msgid "Replace failed: unknown subexpression!" msgid "Replace failed: unknown subexpression!"
msgstr "" msgstr ""
#. Ask for it #. Ask for it
#: search.c:556 #: search.c:548
msgid "Enter line number" msgid "Enter line number"
msgstr "" msgstr ""
#: search.c:558 #: search.c:550
msgid "Aborted" msgid "Aborted"
msgstr "" msgstr ""
#: search.c:578 #: search.c:570
msgid "Come on, be reasonable" msgid "Come on, be reasonable"
msgstr "" msgstr ""
#: search.c:583 #: search.c:575
#, c-format #, c-format
msgid "Only %d lines available, skipping to last line" msgid "Only %d lines available, skipping to last line"
msgstr "" msgstr ""
...@@ -819,62 +819,62 @@ msgstr "" ...@@ -819,62 +819,62 @@ msgstr ""
msgid "input '%c' (%d)\n" msgid "input '%c' (%d)\n"
msgstr "" msgstr ""
#: winio.c:435 #: winio.c:434
msgid "New Buffer" msgid "New Buffer"
msgstr "" msgstr ""
#: winio.c:438 #: winio.c:437
msgid " File: ..." msgid " File: ..."
msgstr "" msgstr ""
#: winio.c:446 #: winio.c:445
msgid "Modified" msgid "Modified"
msgstr "" msgstr ""
#: winio.c:898 #: winio.c:897
#, c-format #, c-format
msgid "Moved to (%d, %d) in edit buffer\n" msgid "Moved to (%d, %d) in edit buffer\n"
msgstr "" msgstr ""
#: winio.c:909 #: winio.c:908
#, c-format #, c-format
msgid "current->data = \"%s\"\n" msgid "current->data = \"%s\"\n"
msgstr "" msgstr ""
#: winio.c:952 #: winio.c:951
#, c-format #, c-format
msgid "I got \"%s\"\n" msgid "I got \"%s\"\n"
msgstr "" msgstr ""
#: winio.c:977 #: winio.c:976
msgid "Yes" msgid "Yes"
msgstr "" msgstr ""
#: winio.c:979 #: winio.c:978
msgid "All" msgid "All"
msgstr "" msgstr ""
#: winio.c:981 #: winio.c:980
msgid "No" msgid "No"
msgstr "" msgstr ""
#: winio.c:1118 #: winio.c:1117
#, c-format #, c-format
msgid "do_cursorpos: linepct = %f, bytepct = %f\n" msgid "do_cursorpos: linepct = %f, bytepct = %f\n"
msgstr "" msgstr ""
#: winio.c:1122 #: winio.c:1121
msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)" msgid "line %d of %d (%.0f%%), character %d of %d (%.0f%%)"
msgstr "" msgstr ""
#: winio.c:1250 #: winio.c:1249
msgid "Dumping file buffer to stderr...\n" msgid "Dumping file buffer to stderr...\n"
msgstr "" msgstr ""
#: winio.c:1252 #: winio.c:1251
msgid "Dumping cutbuffer to stderr...\n" msgid "Dumping cutbuffer to stderr...\n"
msgstr "" msgstr ""
#: winio.c:1254 #: winio.c:1253
msgid "Dumping a buffer to stderr...\n" msgid "Dumping a buffer to stderr...\n"
msgstr "" msgstr ""
...@@ -446,15 +446,7 @@ int do_replace(void) ...@@ -446,15 +446,7 @@ int do_replace(void)
prevanswer = mallocstrcpy(prevanswer, answer); prevanswer = mallocstrcpy(prevanswer, answer);
/* i = statusq(replace_list_2, REPLACE_LIST_2_LEN, last_replace,
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")); _("Replace with"));
switch (i) { switch (i) {
......
...@@ -258,7 +258,7 @@ int nanogetstr(char *buf, char *def, shortcut s[], int slen, int start_x) ...@@ -258,7 +258,7 @@ int nanogetstr(char *buf, char *def, shortcut s[], int slen, int start_x)
while ((kbinput = wgetch(bottomwin)) != 13) { while ((kbinput = wgetch(bottomwin)) != 13) {
for (j = 0; j <= slen - 1; j++) { for (j = 0; j <= slen - 1; j++) {
if (kbinput == s[j].val) { if (kbinput == s[j].val) {
strcpy(answer, ""); answer = mallocstrcpy(answer, "");
return s[j].val; return s[j].val;
} }
} }
...@@ -405,7 +405,6 @@ int nanogetstr(char *buf, char *def, shortcut s[], int slen, int start_x) ...@@ -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 /* Now that the text is editable instead of bracketed, we have to
check for answer == def, instead of answer == "" */ check for answer == def, instead of answer == "" */
/* if (!strcmp(answer, "")) */
if (!strcmp(answer, def)) if (!strcmp(answer, def))
return -2; return -2;
else else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment