- Better integration of View mode (-v) and multibuffer.
Fixes to new_file(), do_insertfile_void(), shortcut_init()
(David Lawrence Ramsey).
+ - The keypad handling has changed (again). We now use
+ the keypad() function by default. New flag -K, --keypad
+ allows the old behavior for those using the keypad arrow keys
+ and rxvt-based terminals.
- nano.c:
die()
- Only save files that were modified (David Lawrence Ramsey).
.B \-F (\-\-multibuffer)
Enable multiple file buffers (if available).
.TP
+.B \-K (\-\-keypad)
+Do not use the ncurses keypad() call unless necessary. Try this flag if
+you find that the arrow keys on the numeric keypad do not work for you
+under nano.
+.TP
.B \-M (\-\-mac)
Write file in Mac format.
.TP
(_
(" -F --multibuffer Enable multiple file buffers\n"));
#endif
+ printf(_
+ (" -K --keypad Use alternate keypad routines\n"));
#ifndef NANO_SMALL
printf
(_
#ifdef ENABLE_MULTIBUFFER
printf(_(" -F Enable multiple file buffers\n"));
#endif
+ printf(_(" -K Use alternate keypad routines\n\n"));
#ifndef NANO_SMALL
printf(_(" -M Write file in Mac format\n"));
#endif
- printf(_(" -T [num] Set width of a tab to num\n"));
printf(_(" -R Use regular expressions for search\n"));
#ifndef NANO_SMALL
printf(_(" -S Smooth scrolling\n"));
#endif
+ printf(_(" -T [num] Set width of a tab to num\n"));
printf(_(" -V Print version information and exit\n"));
printf(_(" -c Constantly show cursor position\n"));
printf(_(" -h Show this message\n"));
#ifndef NANO_SMALL
{"smooth", 0, 0, 'S'},
#endif
+ {"keypad", 0, 0, 'K'},
+
{0, 0, 0, 0}
};
#endif
#endif /* ENABLE_NANORC */
#ifdef HAVE_GETOPT_LONG
- while ((optchr = getopt_long(argc, argv, "h?DFMRST:Vabcefgijklmo:pr:s:tvwxz",
+ while ((optchr = getopt_long(argc, argv, "h?DFKMRST:Vabcefgijklmo:pr:s:tvwxz",
long_options, &option_index)) != EOF) {
#else
while ((optchr =
- getopt(argc, argv, "h?DFMRST:Vabcefgijklmo:pr:s:tvwxz")) != EOF) {
+ getopt(argc, argv, "h?DFKMRST:Vabcefgijklmo:pr:s:tvwxz")) != EOF) {
#endif
switch (optchr) {
SET(MULTIBUFFER);
break;
#endif
+ case 'K':
+ SET(ALT_KEYPAD);
+ break;
#ifndef NANO_SMALL
case 'M':
SET(MAC_FILE);
window_init();
mouse_init();
+ if (!ISSET(ALT_KEYPAD)) {
+ keypad(edit, TRUE);
+ keypad(bottomwin, TRUE);
+ }
+
#ifdef ENABLE_COLOR
do_colorinit();
#define MAC_FILE (1<<22)
#define SMOOTHSCROLL (1<<23)
#define DISABLE_CURPOS (1<<24) /* Damn, we still need it */
+#define ALT_KEYPAD (1<<25) /* Damn, we still need it */
/* Control key sequences, changing these would be very very bad */
#endif
#ifndef DISABLE_WRAPJUSTIFY
- #define NUM_RCOPTS 18
+ #define NUM_RCOPTS 19
#else
- #define NUM_RCOPTS 17
+ #define NUM_RCOPTS 18
#endif
/* Static stuff for the nanorc file */
{"nohelp", NO_HELP},
{"suspend", SUSPEND},
{"multibuffer", MULTIBUFFER},
-{"smooth", SMOOTHSCROLL}};
+{"smooth", SMOOTHSCROLL},
+{"keypad", ALT_KEYPAD}};
/* We have an error in some part of the rcfile; put it on stderr and
make the user hit return to continue starting up nano */