nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit f1d3d9581ae8447e0b9d4f2399f6b421b56ae0b2
parent 40e4acf55e57e2fa263c3b9b84771216863f4c29
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Thu, 26 May 2005 18:03:17 +0000

more miscellaneous minor fixes


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2551 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
Msrc/winio.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/winio.c b/src/winio.c @@ -2441,10 +2441,10 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer, { int kbinput; bool meta_key, func_key, s_or_t, ran_func, finished; - size_t curranswer_len = strlen(curranswer); + size_t curranswer_len; #ifndef DISABLE_TABCOMP bool tabbed = FALSE; - /* Whether we've pressed Tab more than once consecutively. */ + /* Whether we've pressed Tab. */ #endif #ifndef NANO_SMALL char *history = NULL; @@ -2455,6 +2455,7 @@ int nanogetstr(bool allow_tabs, const char *buf, const char *curranswer, #endif answer = mallocstrcpy(answer, curranswer); + curranswer = strlen(answer); /* Only put statusbar_x at the end of the string if it's * uninitialized, if it would be past the end of curranswer, or if