tweaks: rename two more functions, to lose a senseless suffix
parent
cc24e8b86b
commit
69b2467a9a
|
@ -1270,7 +1270,7 @@ void insert_a_file_or(bool execute)
|
||||||
if (!execute)
|
if (!execute)
|
||||||
#endif
|
#endif
|
||||||
if (has_old_position(answer, &priorline, &priorcol))
|
if (has_old_position(answer, &priorline, &priorcol))
|
||||||
do_gotolinecolumn(priorline, priorcol, FALSE, FALSE);
|
goto_line_and_column(priorline, priorcol, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Update title bar and color info for this new buffer. */
|
/* Update title bar and color info for this new buffer. */
|
||||||
|
|
10
src/global.c
10
src/global.c
|
@ -786,7 +786,7 @@ void shortcut_init(void)
|
||||||
#if defined(NANO_TINY) || defined(ENABLE_JUSTIFY)
|
#if defined(NANO_TINY) || defined(ENABLE_JUSTIFY)
|
||||||
/* Conditionally placing this one here or further on, to keep the
|
/* Conditionally placing this one here or further on, to keep the
|
||||||
* help items nicely paired in most conditions. */
|
* help items nicely paired in most conditions. */
|
||||||
add_to_funcs(do_gotolinecolumn_void, MMAIN,
|
add_to_funcs(do_gotolinecolumn, MMAIN,
|
||||||
N_("Go To Line"), WITHORSANS(gotoline_gist), BLANKAFTER, VIEW);
|
N_("Go To Line"), WITHORSANS(gotoline_gist), BLANKAFTER, VIEW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -933,7 +933,7 @@ void shortcut_init(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(NANO_TINY) && !defined(ENABLE_JUSTIFY)
|
#if !defined(NANO_TINY) && !defined(ENABLE_JUSTIFY)
|
||||||
add_to_funcs(do_gotolinecolumn_void, MMAIN,
|
add_to_funcs(do_gotolinecolumn, MMAIN,
|
||||||
N_("Go To Line"), WITHORSANS(gotoline_gist), BLANKAFTER, VIEW);
|
N_("Go To Line"), WITHORSANS(gotoline_gist), BLANKAFTER, VIEW);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1199,9 +1199,9 @@ void shortcut_init(void)
|
||||||
add_to_sclist(MEXECUTE, "^O", 0, do_formatter, 0);
|
add_to_sclist(MEXECUTE, "^O", 0, do_formatter, 0);
|
||||||
#endif
|
#endif
|
||||||
add_to_sclist(MMAIN, "^C", 0, report_cursor_position, 0);
|
add_to_sclist(MMAIN, "^C", 0, report_cursor_position, 0);
|
||||||
add_to_sclist(MMAIN, SLASH_OR_DASH, 0, do_gotolinecolumn_void, 0);
|
add_to_sclist(MMAIN, SLASH_OR_DASH, 0, do_gotolinecolumn, 0);
|
||||||
add_to_sclist(MMAIN, "M-G", 0, do_gotolinecolumn_void, 0);
|
add_to_sclist(MMAIN, "M-G", 0, do_gotolinecolumn, 0);
|
||||||
add_to_sclist(MMAIN, "^_", 0, do_gotolinecolumn_void, 0);
|
add_to_sclist(MMAIN, "^_", 0, do_gotolinecolumn, 0);
|
||||||
add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "^Y", 0, do_page_up, 0);
|
add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "^Y", 0, do_page_up, 0);
|
||||||
add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "PgUp", KEY_PPAGE, do_page_up, 0);
|
add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "PgUp", KEY_PPAGE, do_page_up, 0);
|
||||||
add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "^V", 0, do_page_down, 0);
|
add_to_sclist(MMAIN|MBROWSER|MHELP|MLINTER, "^V", 0, do_page_down, 0);
|
||||||
|
|
|
@ -2434,7 +2434,7 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
/* If a position was given on the command line, go there. */
|
/* If a position was given on the command line, go there. */
|
||||||
if (givenline != 0 || givencol != 0)
|
if (givenline != 0 || givencol != 0)
|
||||||
do_gotolinecolumn(givenline, givencol, FALSE, FALSE);
|
goto_line_and_column(givenline, givencol, FALSE, FALSE);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
else if (searchstring != NULL) {
|
else if (searchstring != NULL) {
|
||||||
if (ISSET(USE_REGEXP))
|
if (ISSET(USE_REGEXP))
|
||||||
|
@ -2457,7 +2457,7 @@ int main(int argc, char **argv)
|
||||||
ssize_t savedline, savedcol;
|
ssize_t savedline, savedcol;
|
||||||
/* If edited before, restore the last cursor position. */
|
/* If edited before, restore the last cursor position. */
|
||||||
if (has_old_position(argv[optind - 1], &savedline, &savedcol))
|
if (has_old_position(argv[optind - 1], &savedline, &savedcol))
|
||||||
do_gotolinecolumn(savedline, savedcol, FALSE, FALSE);
|
goto_line_and_column(savedline, savedcol, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -464,9 +464,9 @@ ssize_t do_replace_loop(const char *needle, bool whole_word_only,
|
||||||
void do_replace(void);
|
void do_replace(void);
|
||||||
void ask_for_and_do_replacements(void);
|
void ask_for_and_do_replacements(void);
|
||||||
void goto_line_posx(ssize_t line, size_t pos_x);
|
void goto_line_posx(ssize_t line, size_t pos_x);
|
||||||
void do_gotolinecolumn(ssize_t line, ssize_t column, bool retain_answer,
|
void goto_line_and_column(ssize_t line, ssize_t column, bool retain_answer,
|
||||||
bool interactive);
|
bool interactive);
|
||||||
void do_gotolinecolumn_void(void);
|
void do_gotolinecolumn(void);
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
void do_find_bracket(void);
|
void do_find_bracket(void);
|
||||||
void put_or_lift_anchor(void);
|
void put_or_lift_anchor(void);
|
||||||
|
|
|
@ -288,7 +288,7 @@ keystruct *strtosc(const char *input)
|
||||||
!strcmp(input, "curpos")) /* Deprecated; remove in 2022. */
|
!strcmp(input, "curpos")) /* Deprecated; remove in 2022. */
|
||||||
s->func = report_cursor_position;
|
s->func = report_cursor_position;
|
||||||
else if (!strcmp(input, "gotoline"))
|
else if (!strcmp(input, "gotoline"))
|
||||||
s->func = do_gotolinecolumn_void;
|
s->func = do_gotolinecolumn;
|
||||||
#ifdef ENABLE_JUSTIFY
|
#ifdef ENABLE_JUSTIFY
|
||||||
else if (!strcmp(input, "justify"))
|
else if (!strcmp(input, "justify"))
|
||||||
s->func = do_justify;
|
s->func = do_justify;
|
||||||
|
|
10
src/search.c
10
src/search.c
|
@ -152,7 +152,7 @@ void search_init(bool replacing, bool retain_answer)
|
||||||
} else
|
} else
|
||||||
replacing = !replacing;
|
replacing = !replacing;
|
||||||
} else if (func == flip_goto) {
|
} else if (func == flip_goto) {
|
||||||
do_gotolinecolumn(openfile->current->lineno,
|
goto_line_and_column(openfile->current->lineno,
|
||||||
openfile->placewewant + 1, TRUE, TRUE);
|
openfile->placewewant + 1, TRUE, TRUE);
|
||||||
break;
|
break;
|
||||||
} else
|
} else
|
||||||
|
@ -747,8 +747,8 @@ void goto_line_posx(ssize_t line, size_t pos_x)
|
||||||
/* Go to the specified line and column, or ask for them if interactive
|
/* Go to the specified line and column, or ask for them if interactive
|
||||||
* is TRUE. In the latter case also update the screen afterwards.
|
* is TRUE. In the latter case also update the screen afterwards.
|
||||||
* Note that both the line and column number should be one-based. */
|
* Note that both the line and column number should be one-based. */
|
||||||
void do_gotolinecolumn(ssize_t line, ssize_t column, bool retain_answer,
|
void goto_line_and_column(ssize_t line, ssize_t column, bool retain_answer,
|
||||||
bool interactive)
|
bool interactive)
|
||||||
{
|
{
|
||||||
if (interactive) {
|
if (interactive) {
|
||||||
/* Ask for the line and column. */
|
/* Ask for the line and column. */
|
||||||
|
@ -844,9 +844,9 @@ void do_gotolinecolumn(ssize_t line, ssize_t column, bool retain_answer,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Go to the specified line and column, asking for them beforehand. */
|
/* Go to the specified line and column, asking for them beforehand. */
|
||||||
void do_gotolinecolumn_void(void)
|
void do_gotolinecolumn(void)
|
||||||
{
|
{
|
||||||
do_gotolinecolumn(openfile->current->lineno,
|
goto_line_and_column(openfile->current->lineno,
|
||||||
openfile->placewewant + 1, FALSE, TRUE);
|
openfile->placewewant + 1, FALSE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue