mirror of git://git.sv.gnu.org/nano.git
Added -b, -e and -f compatibility flags, updated man pages, added Alt-Alt-x functionality
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@411 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
3a7c0bee6b
commit
51b3eec536
12
ChangeLog
12
ChangeLog
|
@ -6,9 +6,11 @@ General
|
|||
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)
|
||||
|
@ -26,6 +28,14 @@ General
|
|||
- 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,
|
||||
|
|
2
faq.html
2
faq.html
|
@ -21,7 +21,7 @@
|
|||
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>
|
||||
|
|
7
nano.1
7
nano.1
|
@ -64,7 +64,9 @@ a new file, do not follow it. Good for editing files in /tmp perhaps?
|
|||
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.
|
||||
|
@ -84,6 +86,9 @@ Disable help screen at bottom of editor.
|
|||
.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
|
||||
|
|
10
nano.1.html
10
nano.1.html
|
@ -86,7 +86,9 @@ Enable mouse support (if available for your system).
|
|||
<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>
|
||||
|
@ -111,6 +113,10 @@ Disable help screen at bottom of editor.
|
|||
|
||||
<DD>
|
||||
Enable suspend ability.
|
||||
<DT><B>-b, -e, -f</B>
|
||||
|
||||
<DD>
|
||||
Ignored, for compatibility with Pico.
|
||||
<DT><B>+LINE</B>
|
||||
|
||||
<DD>
|
||||
|
@ -171,6 +177,6 @@ used by others).
|
|||
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>
|
||||
|
|
36
nano.c
36
nano.c
|
@ -2034,7 +2034,7 @@ int main(int argc, char *argv[])
|
|||
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;
|
||||
|
@ -2077,10 +2077,10 @@ int main(int argc, char *argv[])
|
|||
#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) {
|
||||
|
@ -2099,6 +2099,11 @@ int main(int argc, char *argv[])
|
|||
case 'V':
|
||||
version();
|
||||
exit(0);
|
||||
case 'b':
|
||||
case 'e':
|
||||
case 'f':
|
||||
/* Pico compatibility flags */
|
||||
break;
|
||||
case 'c':
|
||||
SET(CONSTUPDATE);
|
||||
break;
|
||||
|
@ -2275,6 +2280,12 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
#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)) {
|
||||
|
@ -2404,6 +2415,18 @@ int main(int argc, char *argv[])
|
|||
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++) {
|
||||
|
@ -2417,18 +2440,17 @@ int main(int argc, char *argv[])
|
|||
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)
|
||||
|
|
Loading…
Reference in New Issue