HURD. Changes in files.c:write_file(), new function
nano.c:clear_filename(), many changed in main(), a few other
places. Please test this!
+ - Added -b, -e, and -f flags, which we ignore as nano provides
+ their functionality already.
- cut.c:
do_uncut_text()
- - Fix renumbering bug when uncutting marked test at filebot.
+ - Fix renumbering bug when uncutting marked text at filebot.
- Fix screen not being displayed when we are uncutting marked
text at editbot (Bug discovered by Ken Tyler).
- Fix magic line not getting created when (you guessed it)
- nano.c:
renumber()
- Dont stupidly assign the value of prev->lineno if prev == NULL!
+ main()
+ - Added code to check for Alt-Alt (27-27) keystrokes and set the
+ next keystroke as a control sequence. New variable
+ modify_control_key. Removed #ifdef _POSIX_VDISABLE check
+ around Control-S,Q,Z handlers because we need it now for
+ the Alt-Alt-x code.
+- nano.1, nano.1.html:
+ - Updated man page for -b, -e, -f and expanded explanation for -p.
- utils.c:
new_magicline()
- Increment totsize!! We decrement it when we've read a file,
nano?</a></font>
<br><font color="#330000"><a href="#1.5">1.5. Why the name change from
TIP?</a></font>
-<br><font color="#330000"><a href="#1.6">1.6 What is the current version
+<br><font color="#330000"><a href="#1.6">1.6. What is the current version
of nano?</a></font>
<br><font color="#330000"><a href="#1.7">1.7. I want to read the man page
without having to download the program!</a></font></blockquote>
Enable mouse support (if available for your system).
.TP
.B \-p (\-\-pico)
-Emulate Pico as closely as possible.
+Emulate Pico as closely as possible. This affects both the "shortcut list"
+at the bottom of the screen, as well as the display and entry of previous
+search and replace strings.
.TP
.B \-s (\-\-speller)
Enable alternative spell checker command.
.B \-z (\-\-suspend)
Enable suspend ability.
.TP
+.B \-b, \-e, \-f
+Ignored, for compatibility with Pico.
+.TP
.B \+LINE
Places cursor at LINE on startup.
.SH NOTES
<DT><B>-p (--pico)</B>
<DD>
-Emulate Pico as closely as possible.
+Emulate Pico as closely as possible. This affects both the "shortcut list"
+at the bottom of the screen, as well as the display and entry of previous
+search and replace strings.
<DT><B>-s (--speller)</B>
<DD>
<DD>
Enable suspend ability.
+<DT><B>-b, -e, -f</B>
+
+<DD>
+Ignored, for compatibility with Pico.
<DT><B>+LINE</B>
<DD>
This document was created by
<A HREF="http://localhost/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
-Time: 04:21:24 GMT, December 03, 2000
+Time: 02:16:52 GMT, December 18, 2000
</BODY>
</HTML>
int kbinput; /* Input from keyboard */
long startline = 0; /* Line to try and start at */
int keyhandled = 0; /* Have we handled the keystroke yet? */
- int i;
+ int i, modify_control_seq = 0;
char *argv0;
#ifdef _POSIX_VDISABLE
struct termios term;
#endif
#ifdef HAVE_GETOPT_LONG
- while ((optchr = getopt_long(argc, argv, "?T:RVchiklmpr:s:tvwxz",
+ while ((optchr = getopt_long(argc, argv, "?T:RVbcefhiklmpr:s:tvwxz",
long_options, &option_index)) != EOF) {
#else
- while ((optchr = getopt(argc, argv, "h?T:RVciklmpr:s:tvwxz")) != EOF) {
+ while ((optchr = getopt(argc, argv, "h?T:RVbcefiklmpr:s:tvwxz")) != EOF) {
#endif
switch (optchr) {
case 'V':
version();
exit(0);
+ case 'b':
+ case 'e':
+ case 'f':
+ /* Pico compatibility flags */
+ break;
case 'c':
SET(CONSTUPDATE);
break;
}
#endif
break;
+ case 27:
+ /* If we get Alt-Alt, the next keystroke should be the same as a
+ control sequence */
+ modify_control_seq = 1;
+ keyhandled = 1;
+ break;
case 91:
switch (kbinput = wgetch(edit)) {
break;
}
}
+ /* If the modify_control_seq is set, we received an Alt-Alt
+ sequence before this, so we make this key a control sequence
+ by subtracting 64 or 96, depending on its value. */
+ if (!keyhandled && modify_control_seq) {
+ if (kbinput >= 'A' && kbinput < 'a')
+ kbinput -= 64;
+ else if (kbinput >= 'a' && kbinput <= 'z')
+ kbinput -= 96;
+
+ modify_control_seq = 0;
+ }
+
/* Look through the main shortcut list to see if we've hit a
shortcut key */
for (i = 0; i < MAIN_LIST_LEN && !keyhandled; i++) {
keyhandled = 1;
}
}
-#ifndef _POSIX_VDISABLE
- /* Since we're in raw mode, we have to catch ^Q and ^S */
+ /* If we're in raw mode or using Alt-Alt-x, we have to catch
+ Control-S and Control-Q */
if (kbinput == 17 || kbinput == 19)
keyhandled = 1;
- /* And catch ^Z by hand when triggered */
+ /* Catch ^Z by hand when triggered also */
if (kbinput == 26) {
if (ISSET(SUSPEND))
do_suspend(0);
keyhandled = 1;
}
-#endif
/* Last gasp, stuff that's not in the main lists */
if (!keyhandled)