Latest patch by DLR

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1374 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
master
Chris Allegretta 2003-01-17 21:07:38 +00:00
parent b32ccd9257
commit 5af5889448
4 changed files with 398 additions and 399 deletions

View File

@ -159,10 +159,11 @@ Changes
- Move up check for --disable-nls as it's independent of - Move up check for --disable-nls as it's independent of
--enable-tiny now (DLR). --enable-tiny now (DLR).
do_int_speller() do_int_speller()
- Make internal spell program use sort -f and uniq to create a less - Make internal spell program use sort -f and uniq to create a
redundant word list. [The only reason this is going in during less redundant word list. [The only reason this is going in
feature freeze is because the int speller is useless as is and should during feature freeze is because the int speller is useless as
either be improved or removed. I chose improved]. is and should either be improved or removed. I chose
improved].
- Change all child error checks to use one goto (gasp!) called - Change all child error checks to use one goto (gasp!) called
close_pipes_and_exit, so we don't leak FDs. close_pipes_and_exit, so we don't leak FDs.
- Fix FD leaks which occur outside of errors (David Benbennick). - Fix FD leaks which occur outside of errors (David Benbennick).
@ -226,6 +227,8 @@ Changes
nanogetstr() nanogetstr()
- Tweak to make the cursor stay in the same place if we hit a - Tweak to make the cursor stay in the same place if we hit a
prompt-changing toggle while it's in the middle of the string. prompt-changing toggle while it's in the middle of the string.
Reset it to -1 (so next time we come here, it'll be set to the
end of the string) if we leave the prompt via Enter or Cancel.
Also fix minor problem with search history where the current Also fix minor problem with search history where the current
search item could be at the bottom of the history twice in a search item could be at the bottom of the history twice in a
row under certain conditions. (DLR) row under certain conditions. (DLR)

View File

@ -2954,4 +2954,4 @@ come_from:
} }
} }
#endif /* ENABLE_NANORC */ #endif /* ENABLE_NANORC */
#endif /* NANO_SMALL */ #endif /* !NANO_SMALL */

766
po/eu.po

File diff suppressed because it is too large Load Diff

18
winio.c
View File

@ -255,6 +255,11 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
break; break;
} }
#endif #endif
/* We canceled putting in an answer; reset x */
if (kbinput == NANO_CANCEL_KEY)
x = -1;
return t->val; return t->val;
} }
} }
@ -458,12 +463,12 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
fprintf(stderr, _("Aha! \'%c\' (%d)\n"), kbinput, fprintf(stderr, _("Aha! \'%c\' (%d)\n"), kbinput,
kbinput); kbinput);
#endif #endif
if (kbinput == t->val || kbinput == t->val - 32) { if (kbinput == t->val || kbinput == t->val - 32)
/* We hit an Alt key. Do like above. We don't /* We hit an Alt key. Do like above. We don't
just ungetch the letter and let it get caught just ungetch() the letter and let it get
above cause that screws the keypad... */ caught above cause that screws the
keypad... */
return t->val; return t->val;
}
} }
} }
break; break;
@ -488,6 +493,9 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
wrefresh(bottomwin); wrefresh(bottomwin);
} /* while (kbinput ...) */ } /* while (kbinput ...) */
/* We finished putting in an answer; reset x */
x = -1;
/* Just check for a blank answer here */ /* Just check for a blank answer here */
if (answer[0] == '\0') if (answer[0] == '\0')
return -2; return -2;