bindings: rename the bindable function 'gototext' to 'flipgoto'
This brings it in line with the other three "flip" toggles.
Этот коммит содержится в:
родитель
eed765f4f7
Коммит
bb667beb5a
@ -1225,9 +1225,6 @@ Goes to the last line of the file.
|
|||||||
Goes to a specific line (and column if specified). Negative numbers count
|
Goes to a specific line (and column if specified). Negative numbers count
|
||||||
from the end of the file (and end of the line).
|
from the end of the file (and end of the line).
|
||||||
|
|
||||||
@item gototext
|
|
||||||
Switches from targeting a line number to searching for text.
|
|
||||||
|
|
||||||
@item findbracket
|
@item findbracket
|
||||||
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
|
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
|
||||||
(pairs) with the one under the cursor.
|
(pairs) with the one under the cursor.
|
||||||
@ -1293,6 +1290,10 @@ Shows the next history entry in the prompt menus (e.g.@: search).
|
|||||||
Toggles between searching for something and replacing something.
|
Toggles between searching for something and replacing something.
|
||||||
(The form @code{dontreplace} is deprecated.)
|
(The form @code{dontreplace} is deprecated.)
|
||||||
|
|
||||||
|
@item flipgoto
|
||||||
|
Toggles between searching for text and targeting a line number.
|
||||||
|
(The form @code{gototext} is deprecated.)
|
||||||
|
|
||||||
@item flipexecute
|
@item flipexecute
|
||||||
Toggles between inserting a file and executing a command.
|
Toggles between inserting a file and executing a command.
|
||||||
|
|
||||||
|
@ -579,9 +579,6 @@ Goes to the last line of the file.
|
|||||||
Goes to a specific line (and column if specified). Negative numbers count
|
Goes to a specific line (and column if specified). Negative numbers count
|
||||||
from the end of the file (and end of the line).
|
from the end of the file (and end of the line).
|
||||||
.TP
|
.TP
|
||||||
.B gototext
|
|
||||||
Switches from targeting a line number to searching for text.
|
|
||||||
.TP
|
|
||||||
.B findbracket
|
.B findbracket
|
||||||
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
|
Moves the cursor to the bracket (brace, parenthesis, etc.) that matches
|
||||||
(pairs) with the one under the cursor.
|
(pairs) with the one under the cursor.
|
||||||
@ -647,6 +644,10 @@ Shows the next history entry in the prompt menus (e.g. search).
|
|||||||
Toggles between searching for something and replacing something.
|
Toggles between searching for something and replacing something.
|
||||||
(The form 'dontreplace' is deprecated.)
|
(The form 'dontreplace' is deprecated.)
|
||||||
.TP
|
.TP
|
||||||
|
.B flipgoto
|
||||||
|
Toggles between searching for text and targeting a line number.
|
||||||
|
(The form 'gototext' is deprecated.)
|
||||||
|
.TP
|
||||||
.B flipexecute
|
.B flipexecute
|
||||||
Toggles between inserting a file and executing a command.
|
Toggles between inserting a file and executing a command.
|
||||||
.TP
|
.TP
|
||||||
|
16
src/global.c
16
src/global.c
@ -279,7 +279,7 @@ void backwards_void(void)
|
|||||||
void flip_replace(void)
|
void flip_replace(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
void gototext_void(void)
|
void flip_goto(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
#ifdef ENABLE_BROWSER
|
#ifdef ENABLE_BROWSER
|
||||||
@ -822,7 +822,7 @@ void shortcut_init(void)
|
|||||||
add_to_funcs(do_full_justify, MWHEREIS,
|
add_to_funcs(do_full_justify, MWHEREIS,
|
||||||
fulljustify_tag, WITHORSANS(fulljustify_gist), TOGETHER, NOVIEW);
|
fulljustify_tag, WITHORSANS(fulljustify_gist), TOGETHER, NOVIEW);
|
||||||
|
|
||||||
add_to_funcs(do_gotolinecolumn_void, MWHEREIS,
|
add_to_funcs(flip_goto, MWHEREIS,
|
||||||
gotoline_tag, WITHORSANS(gotoline_gist), BLANKAFTER, VIEW);
|
gotoline_tag, WITHORSANS(gotoline_gist), BLANKAFTER, VIEW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -991,11 +991,11 @@ void shortcut_init(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef ENABLE_JUSTIFY
|
#ifndef ENABLE_JUSTIFY
|
||||||
add_to_funcs(do_gotolinecolumn_void, MWHEREIS,
|
add_to_funcs(flip_goto, MWHEREIS,
|
||||||
gotoline_tag, WITHORSANS(gotoline_gist), BLANKAFTER, VIEW);
|
gotoline_tag, WITHORSANS(gotoline_gist), BLANKAFTER, VIEW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
add_to_funcs(gototext_void, MGOTOLINE,
|
add_to_funcs(flip_goto, MGOTOLINE,
|
||||||
N_("Go To Text"), WITHORSANS(whereis_gist), BLANKAFTER, VIEW);
|
N_("Go To Text"), WITHORSANS(whereis_gist), BLANKAFTER, VIEW);
|
||||||
|
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
@ -1281,8 +1281,7 @@ void shortcut_init(void)
|
|||||||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH, "^W", 0, do_para_begin_void, 0);
|
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH, "^W", 0, do_para_begin_void, 0);
|
||||||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH, "^O", 0, do_para_end_void, 0);
|
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH, "^O", 0, do_para_end_void, 0);
|
||||||
#endif
|
#endif
|
||||||
add_to_sclist(MWHEREIS, "^T", 0, do_gotolinecolumn_void, 0);
|
add_to_sclist(MWHEREIS|MGOTOLINE, "^T", 0, flip_goto, 0);
|
||||||
add_to_sclist(MGOTOLINE, "^T", 0, gototext_void, 0);
|
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "^P", 0, get_history_older_void, 0);
|
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "^P", 0, get_history_older_void, 0);
|
||||||
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "^N", 0, get_history_newer_void, 0);
|
add_to_sclist(MWHEREIS|MREPLACE|MREPLACEWITH|MWHEREISFILE|MFINDINHELP|MEXTCMD, "^N", 0, get_history_newer_void, 0);
|
||||||
@ -1617,8 +1616,9 @@ sc *strtosc(const char *input)
|
|||||||
else if (!strcasecmp(input, "flipreplace") ||
|
else if (!strcasecmp(input, "flipreplace") ||
|
||||||
!strcasecmp(input, "dontreplace")) /* Deprecated. Remove in 2018. */
|
!strcasecmp(input, "dontreplace")) /* Deprecated. Remove in 2018. */
|
||||||
s->scfunc = flip_replace;
|
s->scfunc = flip_replace;
|
||||||
else if (!strcasecmp(input, "gototext"))
|
else if (!strcasecmp(input, "flipgoto") ||
|
||||||
s->scfunc = gototext_void;
|
!strcasecmp(input, "gototext")) /* Deprecated. Remove end of 2018. */
|
||||||
|
s->scfunc = flip_goto;
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
else if (!strcasecmp(input, "prevhistory"))
|
else if (!strcasecmp(input, "prevhistory"))
|
||||||
s->scfunc = get_history_older_void;
|
s->scfunc = get_history_older_void;
|
||||||
|
@ -692,7 +692,7 @@ void case_sens_void(void);
|
|||||||
void regexp_void(void);
|
void regexp_void(void);
|
||||||
void backwards_void(void);
|
void backwards_void(void);
|
||||||
void flip_replace(void);
|
void flip_replace(void);
|
||||||
void gototext_void(void);
|
void flip_goto(void);
|
||||||
#ifdef ENABLE_BROWSER
|
#ifdef ENABLE_BROWSER
|
||||||
void to_files_void(void);
|
void to_files_void(void);
|
||||||
void goto_dir_void(void);
|
void goto_dir_void(void);
|
||||||
|
@ -189,7 +189,7 @@ int search_init(bool replacing, bool use_answer)
|
|||||||
} else if (func == flip_replace) {
|
} else if (func == flip_replace) {
|
||||||
backupstring = mallocstrcpy(backupstring, answer);
|
backupstring = mallocstrcpy(backupstring, answer);
|
||||||
return -2; /* Call the opposite search function. */
|
return -2; /* Call the opposite search function. */
|
||||||
} else if (func == do_gotolinecolumn_void) {
|
} else if (func == flip_goto) {
|
||||||
do_gotolinecolumn(openfile->current->lineno,
|
do_gotolinecolumn(openfile->current->lineno,
|
||||||
openfile->placewewant + 1, TRUE, TRUE);
|
openfile->placewewant + 1, TRUE, TRUE);
|
||||||
return 3;
|
return 3;
|
||||||
@ -810,7 +810,7 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool use_answer,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (func_from_key(&i) == gototext_void) {
|
if (func_from_key(&i) == flip_goto) {
|
||||||
/* Retain what the user typed so far and switch to searching. */
|
/* Retain what the user typed so far and switch to searching. */
|
||||||
search_init(TRUE, TRUE);
|
search_init(TRUE, TRUE);
|
||||||
do_search();
|
do_search();
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user