mirror of git://git.sv.gnu.org/nano.git
Allowing the toggle between Read File and Execute Command to be rebound.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4941 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
95592ce5df
commit
04a38da312
|
@ -1,3 +1,10 @@
|
|||
2014-06-04 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/global.c (shortcut_init), src/files.c (do_insertfile): Rename
|
||||
'ext_cmd_void' to 'flip_execute_void' to better match what it does.
|
||||
* src/global.c (strtosc), doc/man/nanorc.5, doc/texinfo/nano.texi:
|
||||
Add function name 'flipexecute' to enable rebinding ^X in the menus
|
||||
Read File and Execute Command.
|
||||
|
||||
2014-06-04 David Lawrence Ramsey <pooka109@gmail.com>
|
||||
* src/*.c: Adjustments of whitespace and comments.
|
||||
* doc/nanorc.sample.in: Interpunction tweaks.
|
||||
|
|
|
@ -520,6 +520,9 @@ Shows the next history entry in the prompt menus (e.g. search).
|
|||
.B dontreplace
|
||||
Switches back to searching instead of replacing.
|
||||
.TP
|
||||
.B flipexecute
|
||||
Toggles between inserting a file and executing a command.
|
||||
.TP
|
||||
.B gototext
|
||||
Searches for files matching a string in the file browser (reading or writing files).
|
||||
.TP
|
||||
|
|
|
@ -1048,6 +1048,9 @@ Shows the next history entry in the prompt menus (e.g. search).
|
|||
@item dontreplace
|
||||
Switches back to searching instead of replacing.
|
||||
|
||||
@item flipexecute
|
||||
Toggles between inserting a file and executing a command.
|
||||
|
||||
@item gototext
|
||||
Searches for files matching a string in the file browser (reading or writing files).
|
||||
|
||||
|
|
|
@ -1084,7 +1084,7 @@ void do_insertfile(
|
|||
continue;
|
||||
} else
|
||||
#endif
|
||||
if (s && s->scfunc == ext_cmd_void) {
|
||||
if (s && s->scfunc == flip_execute_void) {
|
||||
execute = !execute;
|
||||
continue;
|
||||
}
|
||||
|
|
13
src/global.c
13
src/global.c
|
@ -274,7 +274,7 @@ void new_buffer_void(void)
|
|||
void no_replace_void(void)
|
||||
{
|
||||
}
|
||||
void ext_cmd_void(void)
|
||||
void flip_execute_void(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -936,10 +936,10 @@ void shortcut_init(void)
|
|||
/* If we're using restricted mode, file insertion is disabled, and
|
||||
* thus command execution and the multibuffer toggle have no place. */
|
||||
if (!ISSET(RESTRICTED)) {
|
||||
add_to_funcs(ext_cmd_void, MINSERTFILE,
|
||||
add_to_funcs(flip_execute_void, MINSERTFILE,
|
||||
N_("Execute Command"), IFSCHELP(nano_execute_msg), FALSE, NOVIEW);
|
||||
|
||||
add_to_funcs(ext_cmd_void, MEXTCMD,
|
||||
add_to_funcs(flip_execute_void, MEXTCMD,
|
||||
read_file_tag, IFSCHELP(nano_insert_msg), FALSE, NOVIEW);
|
||||
|
||||
#ifndef DISABLE_MULTIBUFFER
|
||||
|
@ -1158,7 +1158,7 @@ void shortcut_init(void)
|
|||
#ifndef DISABLE_BROWSER
|
||||
add_to_sclist(MWRITEFILE|MINSERTFILE, "^T", to_files_void, 0, FALSE);
|
||||
#endif
|
||||
add_to_sclist(MINSERTFILE|MEXTCMD, "^X", ext_cmd_void, 0, FALSE);
|
||||
add_to_sclist(MINSERTFILE|MEXTCMD, "^X", flip_execute_void, 0, FALSE);
|
||||
add_to_sclist(MINSERTFILE|MEXTCMD, "M-F", new_buffer_void, 0, FALSE);
|
||||
add_to_sclist(MHELP|MBROWSER, "^C", do_exit, 0, TRUE);
|
||||
#ifndef DISABLE_HELP
|
||||
|
@ -1506,6 +1506,11 @@ sc *strtosc(char *input)
|
|||
} else if (!strcasecmp(input, "backup")) {
|
||||
s->scfunc = backup_file_void;
|
||||
s->execute = FALSE;
|
||||
#ifndef ENABLE_TINY
|
||||
} else if (!strcasecmp(input, "flipexecute")) {
|
||||
s->scfunc = flip_execute_void;
|
||||
s->execute = FALSE;
|
||||
#endif
|
||||
#ifndef DISABLE_MULTIBUFFER
|
||||
} else if (!strcasecmp(input, "newbuffer")) {
|
||||
s->scfunc = new_buffer_void;
|
||||
|
|
|
@ -837,6 +837,6 @@ void new_buffer_void(void);
|
|||
void backwards_void(void);
|
||||
void goto_dir_void(void);
|
||||
void no_replace_void(void);
|
||||
void ext_cmd_void(void);
|
||||
void flip_execute_void(void);
|
||||
|
||||
#endif /* !PROTO_H */
|
||||
|
|
Loading…
Reference in New Issue