mirror of
git://git.sv.gnu.org/nano.git
synced 2025-02-19 06:44:44 +03:00
More bits left over from getting rid of pico mode, no more CLEAR_BACKUPSTRING, woo! Also reodered flags to remove gaps
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@1339 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
916a8ec69c
commit
37d594c1bd
19
nano.c
19
nano.c
@ -275,14 +275,10 @@ void help_init(void)
|
||||
"for, then hit enter. If there is a match for the text you "
|
||||
"entered, the screen will be updated to the location of the "
|
||||
"nearest match for the search string.\n\n "
|
||||
"If using Pico Mode via the -p or --pico flags, the "
|
||||
"Meta-P toggle, or a nanorc file, the previous search "
|
||||
"string will be shown in brackets after the Search: prompt. "
|
||||
"Hitting Enter without entering any text will perform the "
|
||||
"previous search. Otherwise, the previous string will be "
|
||||
"placed before the cursor, and can be edited or deleted "
|
||||
"before hitting enter.\n\n The following function keys are "
|
||||
"available in Search mode:\n\n");
|
||||
"The previous search string will be shown in brackets after "
|
||||
"the Search: prompt. Hitting Enter without entering any text "
|
||||
"will perform the previous search.\n\n The following function "
|
||||
"keys are available in Search mode:\n\n");
|
||||
else if (currshortcut == goto_list)
|
||||
ptr = _("Go To Line Help Text\n\n "
|
||||
"Enter the line number that you wish to go to and hit "
|
||||
@ -661,7 +657,6 @@ void usage(void)
|
||||
#ifndef DISABLE_OPERATINGDIR
|
||||
print1opt(_("-o [dir]"), _("--operatingdir=[dir]"), _("Set operating directory"));
|
||||
#endif
|
||||
print1opt("-p", "--pico", _("Emulate Pico as closely as possible"));
|
||||
#ifndef DISABLE_WRAPJUSTIFY
|
||||
print1opt(_("-r [#cols]"), _("--fill=[#cols]"), _("Set fill cols to (wrap lines at) #cols"));
|
||||
#endif
|
||||
@ -2933,11 +2928,6 @@ void do_toggle(const toggle *which)
|
||||
TOGGLE(which->flag);
|
||||
|
||||
switch (which->val) {
|
||||
case TOGGLE_PICOMODE_KEY:
|
||||
shortcut_init(0);
|
||||
SET(CLEAR_BACKUPSTRING);
|
||||
display_main_list();
|
||||
break;
|
||||
case TOGGLE_SUSPEND_KEY:
|
||||
signal_init();
|
||||
break;
|
||||
@ -3046,7 +3036,6 @@ int main(int argc, char *argv[])
|
||||
#ifndef DISABLE_OPERATINGDIR
|
||||
{"operatingdir", 1, 0, 'o'},
|
||||
#endif
|
||||
{"pico", 0, 0, 'p'},
|
||||
#ifndef DISABLE_WRAPJUSTIFY
|
||||
{"fill", 1, 0, 'r'},
|
||||
#endif
|
||||
|
46
nano.h
46
nano.h
@ -222,29 +222,28 @@ typedef struct historyheadtype {
|
||||
#define MARK_ISSET (1<<3)
|
||||
#define CONSTUPDATE (1<<4)
|
||||
#define NO_HELP (1<<5)
|
||||
#define NOFOLLOW_SYMLINKS (1<<7)
|
||||
#define SUSPEND (1<<8)
|
||||
#define NO_WRAP (1<<9)
|
||||
#define AUTOINDENT (1<<10)
|
||||
#define SAMELINEWRAP (1<<11)
|
||||
#define VIEW_MODE (1<<12)
|
||||
#define USE_MOUSE (1<<13)
|
||||
#define USE_REGEXP (1<<14)
|
||||
#define REGEXP_COMPILED (1<<15)
|
||||
#define TEMP_OPT (1<<16)
|
||||
#define CUT_TO_END (1<<17)
|
||||
#define REVERSE_SEARCH (1<<18)
|
||||
#define MULTIBUFFER (1<<19)
|
||||
#define CLEAR_BACKUPSTRING (1<<20)
|
||||
#define DOS_FILE (1<<21)
|
||||
#define MAC_FILE (1<<22)
|
||||
#define SMOOTHSCROLL (1<<23)
|
||||
#define DISABLE_CURPOS (1<<24) /* Damn, we still need it */
|
||||
#define ALT_KEYPAD (1<<25)
|
||||
#define NO_CONVERT (1<<26)
|
||||
#define BACKUP_FILE (1<<27)
|
||||
#define NO_RCFILE (1<<28)
|
||||
#define COLOR_SYNTAX (1<<29)
|
||||
#define NOFOLLOW_SYMLINKS (1<<6)
|
||||
#define SUSPEND (1<<7)
|
||||
#define NO_WRAP (1<<8)
|
||||
#define AUTOINDENT (1<<9)
|
||||
#define SAMELINEWRAP (1<<10)
|
||||
#define VIEW_MODE (1<<11)
|
||||
#define USE_MOUSE (1<<12)
|
||||
#define USE_REGEXP (1<<13)
|
||||
#define REGEXP_COMPILED (1<<14)
|
||||
#define TEMP_OPT (1<<15)
|
||||
#define CUT_TO_END (1<<16)
|
||||
#define REVERSE_SEARCH (1<<17)
|
||||
#define MULTIBUFFER (1<<18)
|
||||
#define DOS_FILE (1<<19)
|
||||
#define MAC_FILE (1<<20)
|
||||
#define SMOOTHSCROLL (1<<21)
|
||||
#define DISABLE_CURPOS (1<<22) /* Damn, we still need it */
|
||||
#define ALT_KEYPAD (1<<23)
|
||||
#define NO_CONVERT (1<<24)
|
||||
#define BACKUP_FILE (1<<25)
|
||||
#define NO_RCFILE (1<<26)
|
||||
#define COLOR_SYNTAX (1<<27)
|
||||
|
||||
/* Control key sequences, changing these would be very very bad */
|
||||
|
||||
@ -385,7 +384,6 @@ know what you're doing */
|
||||
#define TOGGLE_AUTOINDENT_KEY NANO_ALT_I
|
||||
#define TOGGLE_SUSPEND_KEY NANO_ALT_Z
|
||||
#define TOGGLE_NOHELP_KEY NANO_ALT_X
|
||||
#define TOGGLE_PICOMODE_KEY NANO_ALT_P
|
||||
#define TOGGLE_MOUSE_KEY NANO_ALT_M
|
||||
#define TOGGLE_CUTTOEND_KEY NANO_ALT_K
|
||||
#define TOGGLE_REGEXP_KEY NANO_ALT_R
|
||||
|
9
search.c
9
search.c
@ -110,14 +110,6 @@ int search_init(int replacing)
|
||||
|
||||
search_init_globals();
|
||||
|
||||
/* Clear the backupstring if we've changed from Pico mode to regular
|
||||
mode */
|
||||
if (ISSET(CLEAR_BACKUPSTRING)) {
|
||||
free(backupstring);
|
||||
backupstring = NULL;
|
||||
UNSET(CLEAR_BACKUPSTRING);
|
||||
}
|
||||
|
||||
if (backupstring == NULL)
|
||||
#ifndef NANO_SMALL
|
||||
backupstring = mallocstrcpy(backupstring, search_history.current->data);
|
||||
@ -131,7 +123,6 @@ int search_init(int replacing)
|
||||
search_history.current = (historytype *)&search_history.next;
|
||||
#endif
|
||||
|
||||
/* If using Pico messages, we do things the old fashioned way... */
|
||||
if (last_search[0] != '\0') {
|
||||
buf = charalloc(COLS / 3 + 7);
|
||||
/* We use COLS / 3 here because we need to see more on the line */
|
||||
|
Loading…
x
Reference in New Issue
Block a user