* src/nano.c (do_input): A toggle should not break a series of ^Ks.
* src/winio.c (get_shortcut): Do not treat holding both Control and
Meta the same as holding only Control.
+ * src/global.c, src/rcfile.c, src/nano.h, src/nano.c, src/text.c:
+ Remove the --undo option, having the undo functions always enabled.
+ If wished, the user can unbind them. This fixes Savannah bug #42456.
+ * doc/man/{nano.1,nanorc.5}, doc/texinfo/nano.texi: Update the docs.
2014-06-11 Benno Schulenberg <bensberg@justemail.net>
* src/winio.c (get_mouseinput): Produce the correct return value for
.\" Hey, EMACS: -*- nroff -*-
+.\" $Id$
+.\"
.\" Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
.\" 2009, 2010, 2013, 2014 Free Software Foundation, Inc.
.\"
.\" Documentation License along with this program. If not, see
.\" <http://www.gnu.org/licenses/>.
.\"
-.\" $Id$
-.TH NANO 1 "version 2.3.3" "April 2014"
+.TH NANO 1 "version 2.3.5" "June 2014"
.\" Please adjust this date whenever revising the manpage.
.\"
Always save changed buffer without prompting. Same as Pico's \fB\-t\fP
option.
.TP
-.B \-u (\-\-undo)
-Enable the experimental generic-purpose undo/redo code. The default undo
-and redo shortcuts are Meta-U and Meta-E, respectively.
-.TP
.B \-v (\-\-view)
View-file (read-only) mode.
.TP
.\" Hey, EMACS: -*- nroff -*-
+.\" $Id$
+.\"
.\" Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011,
.\" 2013, 2014 Free Software Foundation, Inc.
.\"
.\" Documentation License along with this program. If not, see
.\" <http://www.gnu.org/licenses/>.
.\"
-.\" $Id$
-.TH NANORC 5 "version 2.3.3" "May 2014"
+.TH NANORC 5 "version 2.3.5" "June 2014"
.\" Please adjust this date whenever revising the manpage.
.\"
.SH NAME
.BR white , \ black , \ red , \ blue , \ green , \ yellow , \ magenta ", and " cyan .
And either "\fIfgcolor\fR" or ",\fIbgcolor\fR" may be left out.
.TP
-.B set/unset undo
-Enable the experimental generic-purpose undo/redo code.
-.TP
.B set/unset view
Disallow file modification.
.TP
@c This file has the new style title page commands.
@c Run 'makeinfo' rather than 'texinfo-format-buffer'.
@smallbook
-@set EDITION 0.1
-@set VERSION 2.3.3
-@set UPDATED May 2014
+@set EDITION 0.2
+@set VERSION 2.3.5
+@set UPDATED June 2014
@dircategory Editors
@direntry
@titlepage
@title GNU @code{nano}
@subtitle a small and friendly text editor.
-@subtitle version 2.3.3
+@subtitle version 2.3.5
@author Chris Allegretta
@page
exiting, assume yes. This is most useful when using @code{nano} as the
composer of a mailer program.
-@item -u, --undo
-Enable the experimental generic-purpose undo/redo code. The default undo
-and redo shortcuts are Meta-U and Meta-E, respectively.
-
@item -v, --view
Don't allow the contents of the file to be altered. Note that this
option should NOT be used in place of correct file permissions to
white, black, red, blue, green, yellow, magenta, and cyan.
And either "fgcolor" or ",bgcolor" may be left out.
-@item set/unset undo
-Enable the experimental generic-purpose undo/redo code.
-
@item set/unset view
Disallow file modification.
add_to_funcs(do_unindent, MMAIN,
N_("Unindent Text"), IFSCHELP(nano_unindent_msg), TRUE, NOVIEW);
- if (ISSET(UNDOABLE)) {
- add_to_funcs(do_undo, MMAIN,
- N_("Undo"), IFSCHELP(nano_undo_msg), FALSE, NOVIEW);
- add_to_funcs(do_redo, MMAIN,
- N_("Redo"), IFSCHELP(nano_redo_msg), TRUE, NOVIEW);
- }
+ add_to_funcs(do_undo, MMAIN,
+ N_("Undo"), IFSCHELP(nano_undo_msg), FALSE, NOVIEW);
+ add_to_funcs(do_redo, MMAIN,
+ N_("Redo"), IFSCHELP(nano_redo_msg), TRUE, NOVIEW);
#endif /* !NANO_TINY */
add_to_funcs(do_left, MMAIN,
add_to_sclist(MMAIN, "M-6", do_copy_text, 0, TRUE);
add_to_sclist(MMAIN, "M-}", do_indent_void, 0, TRUE);
add_to_sclist(MMAIN, "M-{", do_unindent, 0, TRUE);
- if (ISSET(UNDOABLE)) {
- add_to_sclist(MMAIN, "M-U", do_undo, 0, TRUE);
- add_to_sclist(MMAIN, "M-E", do_redo, 0, TRUE);
- }
+ add_to_sclist(MMAIN, "M-U", do_undo, 0, TRUE);
+ add_to_sclist(MMAIN, "M-E", do_redo, 0, TRUE);
#endif
add_to_sclist(MMOST, "^B", do_left, 0, TRUE);
add_to_sclist(MMOST, "^F", do_right, 0, TRUE);
#endif
print_opt("-t", "--tempfile",
N_("Auto save on exit, don't prompt"));
-#ifndef NANO_TINY
- print_opt("-u", "--undo", N_("Allow generic undo [EXPERIMENTAL]"));
-#endif
-
print_opt("-v", "--view", N_("View mode (read-only)"));
#ifndef DISABLE_WRAPPING
print_opt("-w", "--nowrap", N_("Don't hard-wrap long lines"));
while ((optchr =
#ifdef HAVE_GETOPT_LONG
getopt_long(argc, argv,
- "ABC:DEFGHIKLNOPQ:RST:UVWY:abcdefghijklmno:pqr:s:tuvwxz$",
+ "ABC:DEFGHIKLNOPQ:RST:UVWY:abcdefghijklmno:pqr:s:tvwxz$",
long_options, NULL)
#else
getopt(argc, argv,
- "ABC:DEFGHIKLNOPQ:RST:UVWY:abcdefghijklmno:pqr:s:tuvwxz$")
+ "ABC:DEFGHIKLNOPQ:RST:UVWY:abcdefghijklmno:pqr:s:tvwxz$")
#endif
) != -1) {
switch (optchr) {
case 't':
SET(TEMP_FILE);
break;
-#ifndef NANO_TINY
- case 'u':
- SET(UNDOABLE);
- break;
-#endif
case 'v':
SET(VIEW_MODE);
break;
NO_NEWLINES,
BOLD_TEXT,
QUIET,
- UNDOABLE,
SOFTWRAP,
POS_HISTORY,
LOCKING,
{"smarthome", SMART_HOME},
{"smooth", SMOOTH_SCROLL},
{"tabstospaces", TABS_TO_SPACES},
- {"undo", UNDOABLE},
{"whitespace", 0},
{"wordbounds", WORD_BOUNDS},
{"softwrap", SOFTWRAP},
else
rcfile_error(N_("Cannot unset option \"%s\""),
rcopts[i].name);
- /* If undo/redo was enabled, reinitialize the lists. */
- if (strcasecmp(rcopts[i].name, "undo") == 0)
- shortcut_init();
break;
}
}
openfilestruct *fs = openfile;
/* Last thing we cut to set up the undo for uncut. */
- if (!ISSET(UNDOABLE))
- return;
-
/* Ugh, if we were called while cutting not-to-end, non-marked, and
* on the same lineno, we need to abort here. */
u = fs->current_undo;
undo *u;
openfilestruct *fs = openfile;
- if (!ISSET(UNDOABLE))
- return;
-
#ifdef DEBUG
fprintf(stderr, "action = %d, fs->last_action = %d, openfile->current->lineno = %ld",
action, fs->last_action, (long)openfile->current->lineno);