Commit 5af58894 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

Latest patch by DLR

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1374 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
parent b32ccd92
Showing with 398 additions and 399 deletions
+398 -399
......@@ -159,10 +159,11 @@ Changes
- Move up check for --disable-nls as it's independent of
--enable-tiny now (DLR).
do_int_speller()
- Make internal spell program use sort -f and uniq to create a less
redundant word list. [The only reason this is going in during
feature freeze is because the int speller is useless as is and should
either be improved or removed. I chose improved].
- Make internal spell program use sort -f and uniq to create a
less redundant word list. [The only reason this is going in
during feature freeze is because the int speller is useless as
is and should either be improved or removed. I chose
improved].
- Change all child error checks to use one goto (gasp!) called
close_pipes_and_exit, so we don't leak FDs.
- Fix FD leaks which occur outside of errors (David Benbennick).
......@@ -226,6 +227,8 @@ Changes
nanogetstr()
- 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.
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
search item could be at the bottom of the history twice in a
row under certain conditions. (DLR)
......
......@@ -2954,4 +2954,4 @@ come_from:
}
}
#endif /* ENABLE_NANORC */
#endif /* NANO_SMALL */
#endif /* !NANO_SMALL */
This diff is collapsed.
......@@ -255,6 +255,11 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
break;
}
#endif
/* We canceled putting in an answer; reset x */
if (kbinput == NANO_CANCEL_KEY)
x = -1;
return t->val;
}
}
......@@ -458,12 +463,12 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
fprintf(stderr, _("Aha! \'%c\' (%d)\n"), kbinput,
kbinput);
#endif
if (kbinput == t->val || kbinput == t->val - 32) {
/* We hit an Alt key. Do like above. We don't
just ungetch the letter and let it get caught
above cause that screws the keypad... */
if (kbinput == t->val || kbinput == t->val - 32)
/* We hit an Alt key. Do like above. We don't
just ungetch() the letter and let it get
caught above cause that screws the
keypad... */
return t->val;
}
}
}
break;
......@@ -488,6 +493,9 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
wrefresh(bottomwin);
} /* while (kbinput ...) */
/* We finished putting in an answer; reset x */
x = -1;
/* Just check for a blank answer here */
if (answer[0] == '\0')
return -2;
......
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