X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/14c29200cb58d3c4a0830265f2433849781858d0..20f65ac3b82b354496b5bb469ff184ba8b0bcd96:/enter.c diff --git a/enter.c b/enter.c index 3e4d4e6..058e5d8 100644 --- a/enter.c +++ b/enter.c @@ -1,6 +1,6 @@ /* - * Copyright (C) 1996-2000 Michael R. Elkins - * Copyright (C) 2000 Edmund Grimley Evans + * Copyright (C) 1996-2000,2007 Michael R. Elkins + * Copyright (C) 2000-1 Edmund Grimley Evans * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -120,7 +120,7 @@ static void my_wcstombs (char *dest, size_t dlen, const wchar_t *src, size_t sle } } -size_t my_mbstowcs (wchar_t **pwbuf, size_t *pwbuflen, size_t i, char *buf) +static size_t my_mbstowcs (wchar_t **pwbuf, size_t *pwbuflen, size_t i, char *buf) { wchar_t wc; mbstate_t st; @@ -572,7 +572,7 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, set_option (OPTNEEDREDRAW); if (*buf) { - mutt_pretty_mailbox (buf); + mutt_pretty_mailbox (buf, buflen); if (!pass) mutt_history_add (hclass, buf, 1); rv = 0; @@ -603,7 +603,7 @@ int _mutt_enter_string (char *buf, size_t buflen, int y, int x, event_t event; /*ADDCH (LastKey);*/ event = mutt_getch (); - if (event.ch != -1) + if (event.ch >= 0) { LastKey = event.ch; goto self_insert;