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
master
David Lawrence Ramsey 2005-11-16 21:34:46 +00:00
parent c009ec56f5
commit ad074011c9
2 changed files with 7 additions and 6 deletions

View File

@ -147,6 +147,9 @@ CVS code -
reset_statusbar_cursor() reset_statusbar_cursor()
- Fix cursor placement problem by modeling the code more closely - Fix cursor placement problem by modeling the code more closely
after reset_cursor(). (DLR) 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: - rcfile.c:
do_rcfile() do_rcfile()
- Remove unneeded assert. (DLR) - Remove unneeded assert. (DLR)

View File

@ -897,9 +897,9 @@ int get_prompt_string(bool allow_tabs, const char *curranswer,
#endif #endif
switch (kbinput) { switch (kbinput) {
case NANO_TAB_KEY:
#ifndef DISABLE_TABCOMP #ifndef DISABLE_TABCOMP
#ifndef NANO_TINY #ifndef NANO_TINY
case NANO_TAB_KEY:
if (history_list != NULL) { if (history_list != NULL) {
if (last_kbinput != NANO_TAB_KEY) if (last_kbinput != NANO_TAB_KEY)
complete_len = strlen(answer); complete_len = strlen(answer);
@ -917,10 +917,10 @@ int get_prompt_string(bool allow_tabs, const char *curranswer,
list); list);
update_statusbar_line(answer, statusbar_x); update_statusbar_line(answer, statusbar_x);
#endif /* !DISABLE_TABCOMP */
break; break;
case NANO_PREVLINE_KEY: #endif /* !DISABLE_TABCOMP */
#ifndef NANO_TINY #ifndef NANO_TINY
case NANO_PREVLINE_KEY:
if (history_list != NULL) { if (history_list != NULL) {
/* If we're scrolling up at the bottom of the /* If we're scrolling up at the bottom of the
* history list and answer isn't blank, save answer * 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. */ * statusbar prompt. */
finished = FALSE; finished = FALSE;
} }
#endif /* !NANO_TINY */
break; break;
case NANO_NEXTLINE_KEY: case NANO_NEXTLINE_KEY:
#ifndef NANO_TINY
if (history_list != NULL) { if (history_list != NULL) {
/* Get the newer search from the history list and /* Get the newer search from the history list and
* save it in answer. If there is no newer search, * 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); update_statusbar_line(answer, statusbar_x);
} }
#endif /* !NANO_TINY */
break; break;
#endif /* !NANO_TINY */
} }
/* If we have a shortcut with an associated function, break out /* If we have a shortcut with an associated function, break out