Fix broken meta keys screwing up previous answer, fix misplaced (?) #endif in nanogetstr

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1342 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Chris Allegretta 2003-01-09 23:43:12 +00:00
parent 8031f83422
commit 54abd94d48
2 changed files with 3 additions and 7 deletions

View File

@ -111,14 +111,10 @@ int search_init(int replacing)
search_init_globals(); search_init_globals();
if (backupstring == NULL) if (backupstring == NULL)
#ifndef NANO_SMALL backupstring = mallocstrcpy(backupstring, "");
backupstring = mallocstrcpy(backupstring, search_history.current->data);
#else
backupstring = mallocstrcpy(backupstring, last_search);
#endif
/* NEW TEST */ /* NEW TEST */
backupstring = mallocstrcpy(backupstring, "");
#ifndef NANO_SMALL #ifndef NANO_SMALL
search_history.current = (historytype *)&search_history.next; search_history.current = (historytype *)&search_history.next;
#endif #endif

View File

@ -369,8 +369,8 @@ int nanogetstr(int allowtabs, const char *buf, const char *def,
} }
x = xend; x = xend;
} }
break;
#endif #endif
break;
case KEY_DOWN: case KEY_DOWN:
#ifndef NANO_SMALL #ifndef NANO_SMALL
if (history_list) { if (history_list) {