Add in rcfile support for undo since it would be bad to overly punish the masochists who want to try it out and hopefully submit bug reports.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4396 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
ad37e67dd2
Коммит
0a10e20eec
@ -202,6 +202,9 @@ Convert typed tabs to spaces.
|
|||||||
.B set/unset tempfile
|
.B set/unset tempfile
|
||||||
Save automatically on exit, don't prompt.
|
Save automatically on exit, don't prompt.
|
||||||
.TP
|
.TP
|
||||||
|
.B set/unset undo
|
||||||
|
Enable experimental generic-purpose undo code.
|
||||||
|
.TP
|
||||||
.B set/unset view
|
.B set/unset view
|
||||||
Disallow file modification.
|
Disallow file modification.
|
||||||
.TP
|
.TP
|
||||||
|
10
src/rcfile.c
10
src/rcfile.c
@ -89,6 +89,7 @@ static const rcoption rcopts[] = {
|
|||||||
{"smarthome", SMART_HOME},
|
{"smarthome", SMART_HOME},
|
||||||
{"smooth", SMOOTH_SCROLL},
|
{"smooth", SMOOTH_SCROLL},
|
||||||
{"tabstospaces", TABS_TO_SPACES},
|
{"tabstospaces", TABS_TO_SPACES},
|
||||||
|
{"undo", 0},
|
||||||
{"whitespace", 0},
|
{"whitespace", 0},
|
||||||
{"wordbounds", WORD_BOUNDS},
|
{"wordbounds", WORD_BOUNDS},
|
||||||
#endif
|
#endif
|
||||||
@ -908,6 +909,15 @@ void parse_rcfile(FILE *rcstream
|
|||||||
option = ptr;
|
option = ptr;
|
||||||
ptr = parse_next_word(ptr);
|
ptr = parse_next_word(ptr);
|
||||||
|
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
/* FIXME: Hack which should go away ASAP */
|
||||||
|
if (strcasecmp(option, "undo") == 0) {
|
||||||
|
use_undo = TRUE;
|
||||||
|
shortcut_init(0);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
for (i = 0; rcopts[i].name != NULL; i++) {
|
for (i = 0; rcopts[i].name != NULL; i++) {
|
||||||
if (strcasecmp(option, rcopts[i].name) == 0) {
|
if (strcasecmp(option, rcopts[i].name) == 0) {
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user