diff --git a/BUGS b/BUGS index 9db3c8592e0f08fc02cd0604b0fd148c2bc3f6fa..2cbaa7d0fe75868d1d8682f599f288fb7ecc9116 100644 --- a/BUGS +++ b/BUGS @@ -117,7 +117,11 @@ - Blank lines are not kept when cutting with -k (discovered by Rocco) (61) [FIXED]. - Nano will not suspend properly inside of mutt (62) [FIXED]. - +- When switching from Pico mode to normal mode, the previous search is + not displayed until cancelling the search (63) [FIXED]. +- If you change search options but don't change the search string in + normal mode, hitting enter causes the search/replace to abort (64) + (Jordi Mallach) [FIXED]. ** Open BUGS ** diff --git a/ChangeLog b/ChangeLog index b43e15cbb0fe7465671bacbd1e6aabdd0ac0fe91..8fa5fcdc235d536a218bbed4ca0be46a392d505f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,9 @@ CVS code - +- General + - Added BUGS #63 & 64. Fixes in search_init() and nanogetstr(), + new flag CLEAR_BACKUPSTRING because there's no easy way to + clear the backupstring without making it global (messy), so we + use a flag instead (just as messy?) - nano.texi: -corrected the Mouse Toggle section, noticed by Daniel Bonniot. diff --git a/nano.c b/nano.c index 6d5c34c6aa780b4523d8df18c28eaa4cf7f6ac9d..1357b616c70736ed89fe830afc20327644e64a0a 100644 --- a/nano.c +++ b/nano.c @@ -2274,6 +2274,7 @@ void do_toggle(int which) switch (toggles[which].val) { case TOGGLE_PICOMODE_KEY: shortcut_init(0); + SET(CLEAR_BACKUPSTRING); display_main_list(); break; case TOGGLE_SUSPEND_KEY: diff --git a/nano.h b/nano.h index 8ff945a3165f776ac6fd06dbfaf2078a41c4004a..d6914897e9c9a84a7eac7a08ced8eb05ae4c2082 100644 --- a/nano.h +++ b/nano.h @@ -140,6 +140,7 @@ typedef struct rcoption { #define DISABLE_CURPOS (1<<18) #define REVERSE_SEARCH (1<<19) #define MULTIBUFFER (1<<20) +#define CLEAR_BACKUPSTRING (1<<21) /* Control key sequences, changing these would be very very bad */ diff --git a/nano.info b/nano.info index 55309cd24ba44f01be5c4a34ffca319c11f8ab88..8a3406f7d9326319b31f436d6f76afdde32c2281 100644 --- a/nano.info +++ b/nano.info @@ -258,7 +258,7 @@ following toggles are available: `Cut To End Toggle (Meta-K)' toggles the -k (-cut) command line flag. -`Cut To End Toggle (Meta-M)' +`Mouse Toggle (Meta-M)' toggles the -m (-mouse) command line flag. `Pico Mode Toggle (Meta-P)' @@ -404,8 +404,8 @@ Node: The Statusbar6367 Node: Shortcut Lists6948 Node: Online Help7341 Node: Feature Toggles7717 -Node: The File Browser8860 -Node: Pico Compatibility9569 -Node: Building and Configure Options11611 +Node: The File Browser8855 +Node: Pico Compatibility9564 +Node: Building and Configure Options11606 End Tag Table diff --git a/search.c b/search.c index 8a2dd4300c12b3702a8b74474767178439cc0478..0145fb16b6c7f3af725455553d9d923550eb758e 100644 --- a/search.c +++ b/search.c @@ -85,6 +85,14 @@ int search_init(int replacing) buf = charalloc(strlen(last_search) + 5); buf[0] = 0; + + /* Clear the backupstring if we've changed from Pico mode to regular + mode */ + if (ISSET(CLEAR_BACKUPSTRING)) { + free(backupstring); + backupstring = NULL; + } + /* Okay, fun time. backupstring is our holder for what is being returned from the statusq call. Using answer for this would be tricky. Here, if we're using PICO_MODE, we only want nano to put the @@ -183,17 +191,6 @@ int search_init(int replacing) case NANO_OTHERSEARCH_KEY: backupstring = mallocstrcpy(backupstring, answer); return -2; /* Call the opposite search function */ -/* - } else if (i == NANO_REVERSESEARCH_KEY) { - free(backupstring); - backupstring = NULL; - backupstring = mallocstrcpy(backupstring, answer); - - TOGGLE(REVERSE_SEARCH); - - return 1; - } else if (i == NANO_FROMSEARCHTOGOTO_KEY) { -*/ case NANO_FROMSEARCHTOGOTO_KEY: free(backupstring); backupstring = NULL; diff --git a/winio.c b/winio.c index 3181c86d4bf0c7f051e9d4e830717d7655798ce3..f96e563dceec8a755760e7214e1f41dbd321be51 100644 --- a/winio.c +++ b/winio.c @@ -499,10 +499,8 @@ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen, answer = mallocstrcpy(answer, inputbuf); free(inputbuf); - /* Now that the text is editable instead of bracketed, we have to - check for answer == def, instead of answer == "" */ - if (((ISSET(PICO_MODE)) && !strcmp(answer, "")) || - ((!ISSET(PICO_MODE)) && !strcmp(answer, def))) + /* In pico mode, just check for a blank answer here */ + if (((ISSET(PICO_MODE)) && !strcmp(answer, ""))) return -2; else return 0;