commit ad074011c93d91e19723b74619a8e94c131ae4c4
parent c009ec56f56275dbad7f8cb53adedd620f77e505
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date: Wed, 16 Nov 2005 21:34:46 +0000
in get_prompt_string(), adjust #ifdefs to leave out disabled keys
entirely instead of keeping enough code to just ignore them
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3196 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -147,6 +147,9 @@ CVS code -
reset_statusbar_cursor()
- Fix cursor placement problem by modeling the code more closely
after reset_cursor(). (DLR)
+ get_prompt_string()
+ - Adjust #ifdefs to leave out disabled keys entirely instead of
+ keeping enough code to just ignore them. (DLR)
- rcfile.c:
do_rcfile()
- Remove unneeded assert. (DLR)
diff --git a/src/prompt.c b/src/prompt.c
@@ -897,9 +897,9 @@ int get_prompt_string(bool allow_tabs, const char *curranswer,
#endif
switch (kbinput) {
- case NANO_TAB_KEY:
#ifndef DISABLE_TABCOMP
#ifndef NANO_TINY
+ case NANO_TAB_KEY:
if (history_list != NULL) {
if (last_kbinput != NANO_TAB_KEY)
complete_len = strlen(answer);
@@ -917,10 +917,10 @@ int get_prompt_string(bool allow_tabs, const char *curranswer,
list);
update_statusbar_line(answer, statusbar_x);
-#endif /* !DISABLE_TABCOMP */
break;
- case NANO_PREVLINE_KEY:
+#endif /* !DISABLE_TABCOMP */
#ifndef NANO_TINY
+ case NANO_PREVLINE_KEY:
if (history_list != NULL) {
/* If we're scrolling up at the bottom of the
* history list and answer isn't blank, save answer
@@ -948,10 +948,8 @@ int get_prompt_string(bool allow_tabs, const char *curranswer,
* statusbar prompt. */
finished = FALSE;
}
-#endif /* !NANO_TINY */
break;
case NANO_NEXTLINE_KEY:
-#ifndef NANO_TINY
if (history_list != NULL) {
/* Get the newer search from the history list and
* save it in answer. If there is no newer search,
@@ -974,8 +972,8 @@ int get_prompt_string(bool allow_tabs, const char *curranswer,
update_statusbar_line(answer, statusbar_x);
}
-#endif /* !NANO_TINY */
break;
+#endif /* !NANO_TINY */
}
/* If we have a shortcut with an associated function, break out