DB's gotoline fix

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1443 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2003-02-10 02:55:03 +00:00
parent f8f2d586dc
commit a90d0cf214
3 changed files with 14 additions and 5 deletions

View File

@ -27,10 +27,16 @@ CVS code
(David Benbennick). (David Benbennick).
colortoint, parse_colors() colortoint, parse_colors()
- Don't add strings with invalid fg colors at all. - Don't add strings with invalid fg colors at all.
- search.c:
do_gotoline()
- Only goto_abort() if we *didnt* abort the command, making
the function seem horribly misnamed ;-) (David Benbennick).
- winio.c: - winio.c:
nanogetstr() nanogetstr()
- Remove unnecessary reset of x since it is now handled - Remove unnecessary reset of x since it is now handled
elsewhere (David Lawrence Ramsey). elsewhere (David Lawrence Ramsey).
statusq()
- Always blank the statusbar on exit (David Benbennick).
- nano.1, nano.1.html: - nano.1, nano.1.html:
- Add initialization file comments, change some options from - Add initialization file comments, change some options from
bracketed to underlined to emphasize that they are not bracketed to underlined to emphasize that they are not

View File

@ -776,12 +776,16 @@ void goto_abort(void)
int do_gotoline(int line, int save_pos) int do_gotoline(int line, int save_pos)
{ {
if (line <= 0) { /* Ask for it */ if (line <= 0) { /* Ask for it */
if (statusq(0, goto_list, (line ? answer : ""), int st = statusq(FALSE, goto_list, line != 0 ? answer : "",
#ifndef NANO_SMALL #ifndef NANO_SMALL
0, NULL,
#endif #endif
_("Enter line number"))) { _("Enter line number"));
/* Cancel, or Enter with blank string. */
if (st == -1 || st == -2)
statusbar(_("Aborted")); statusbar(_("Aborted"));
if (st != 0) {
goto_abort(); goto_abort();
return 0; return 0;
} }

View File

@ -1197,9 +1197,8 @@ int statusq(int tabs, const shortcut *s, const char *def,
ret = -1; ret = -1;
resetpos = 1; resetpos = 1;
break; break;
default:
blank_statusbar();
} }
blank_statusbar();
#ifdef DEBUG #ifdef DEBUG
fprintf(stderr, _("I got \"%s\"\n"), answer); fprintf(stderr, _("I got \"%s\"\n"), answer);