1
1
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@744 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
Chris Allegretta 2001-08-17 00:03:46 +00:00
родитель 372b1a0939
Коммит c1049aced1
7 изменённых файлов: 26 добавлений и 20 удалений

6
BUGS
Просмотреть файл

@ -117,7 +117,11 @@
- Blank lines are not kept when cutting with -k (discovered by Rocco) - Blank lines are not kept when cutting with -k (discovered by Rocco)
(61) [FIXED]. (61) [FIXED].
- Nano will not suspend properly inside of mutt (62) [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 ** ** Open BUGS **

Просмотреть файл

@ -1,4 +1,9 @@
CVS code - 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: - nano.texi:
-corrected the Mouse Toggle section, noticed by Daniel Bonniot. -corrected the Mouse Toggle section, noticed by Daniel Bonniot.

1
nano.c
Просмотреть файл

@ -2274,6 +2274,7 @@ void do_toggle(int which)
switch (toggles[which].val) { switch (toggles[which].val) {
case TOGGLE_PICOMODE_KEY: case TOGGLE_PICOMODE_KEY:
shortcut_init(0); shortcut_init(0);
SET(CLEAR_BACKUPSTRING);
display_main_list(); display_main_list();
break; break;
case TOGGLE_SUSPEND_KEY: case TOGGLE_SUSPEND_KEY:

1
nano.h
Просмотреть файл

@ -140,6 +140,7 @@ typedef struct rcoption {
#define DISABLE_CURPOS (1<<18) #define DISABLE_CURPOS (1<<18)
#define REVERSE_SEARCH (1<<19) #define REVERSE_SEARCH (1<<19)
#define MULTIBUFFER (1<<20) #define MULTIBUFFER (1<<20)
#define CLEAR_BACKUPSTRING (1<<21)
/* Control key sequences, changing these would be very very bad */ /* Control key sequences, changing these would be very very bad */

Просмотреть файл

@ -258,7 +258,7 @@ following toggles are available:
`Cut To End Toggle (Meta-K)' `Cut To End Toggle (Meta-K)'
toggles the -k (-cut) command line flag. toggles the -k (-cut) command line flag.
`Cut To End Toggle (Meta-M)' `Mouse Toggle (Meta-M)'
toggles the -m (-mouse) command line flag. toggles the -m (-mouse) command line flag.
`Pico Mode Toggle (Meta-P)' `Pico Mode Toggle (Meta-P)'
@ -404,8 +404,8 @@ Node: The Statusbar6367
Node: Shortcut Lists6948 Node: Shortcut Lists6948
Node: Online Help7341 Node: Online Help7341
Node: Feature Toggles7717 Node: Feature Toggles7717
Node: The File Browser8860 Node: The File Browser8855
Node: Pico Compatibility9569 Node: Pico Compatibility9564
Node: Building and Configure Options11611 Node: Building and Configure Options11606
 
End Tag Table End Tag Table

Просмотреть файл

@ -85,6 +85,14 @@ int search_init(int replacing)
buf = charalloc(strlen(last_search) + 5); buf = charalloc(strlen(last_search) + 5);
buf[0] = 0; 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 /* Okay, fun time. backupstring is our holder for what is being
returned from the statusq call. Using answer for this would be tricky. 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 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: case NANO_OTHERSEARCH_KEY:
backupstring = mallocstrcpy(backupstring, answer); backupstring = mallocstrcpy(backupstring, answer);
return -2; /* Call the opposite search function */ 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: case NANO_FROMSEARCHTOGOTO_KEY:
free(backupstring); free(backupstring);
backupstring = NULL; backupstring = NULL;

Просмотреть файл

@ -499,10 +499,8 @@ int nanogetstr(int allowtabs, char *buf, char *def, shortcut s[], int slen,
answer = mallocstrcpy(answer, inputbuf); answer = mallocstrcpy(answer, inputbuf);
free(inputbuf); free(inputbuf);
/* Now that the text is editable instead of bracketed, we have to /* In pico mode, just check for a blank answer here */
check for answer == def, instead of answer == "" */ if (((ISSET(PICO_MODE)) && !strcmp(answer, "")))
if (((ISSET(PICO_MODE)) && !strcmp(answer, "")) ||
((!ISSET(PICO_MODE)) && !strcmp(answer, def)))
return -2; return -2;
else else
return 0; return 0;