tweaks: rename a function and its parameter, to be clearer
Этот коммит содержится в:
родитель
e9f0597e2e
Коммит
9c45b5da6c
@ -63,14 +63,14 @@ void history_init(void)
|
|||||||
executebot = execute_history;
|
executebot = execute_history;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the current position in the given history list to the bottom. */
|
/* Reset the pointer into the history list that contains item to the bottom. */
|
||||||
void history_reset(const linestruct *list)
|
void reset_history_pointer_for(const linestruct *item)
|
||||||
{
|
{
|
||||||
if (list == search_history)
|
if (item == search_history)
|
||||||
search_history = searchbot;
|
search_history = searchbot;
|
||||||
else if (list == replace_history)
|
else if (item == replace_history)
|
||||||
replace_history = replacebot;
|
replace_history = replacebot;
|
||||||
else if (list == execute_history)
|
else if (item == execute_history)
|
||||||
execute_history = executebot;
|
execute_history = executebot;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -456,7 +456,7 @@ functionptrtype acquire_an_answer(int *actual, bool *listed,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (history_list != NULL)
|
if (history_list != NULL)
|
||||||
history_reset(*history_list);
|
reset_history_pointer_for(*history_list);
|
||||||
#endif /* ENABLE_HISTORIES */
|
#endif /* ENABLE_HISTORIES */
|
||||||
|
|
||||||
if (typing_x > strlen(answer))
|
if (typing_x > strlen(answer))
|
||||||
@ -568,7 +568,7 @@ functionptrtype acquire_an_answer(int *actual, bool *listed,
|
|||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
/* Put the history pointer back at the bottom of the list. */
|
/* Put the history pointer back at the bottom of the list. */
|
||||||
if (history_list != NULL) {
|
if (history_list != NULL) {
|
||||||
history_reset(*history_list);
|
reset_history_pointer_for(*history_list);
|
||||||
free(magichistory);
|
free(magichistory);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -334,7 +334,7 @@ void do_help(void);
|
|||||||
/* Most functions in history.c. */
|
/* Most functions in history.c. */
|
||||||
#ifdef ENABLE_HISTORIES
|
#ifdef ENABLE_HISTORIES
|
||||||
void history_init(void);
|
void history_init(void);
|
||||||
void history_reset(const linestruct *list);
|
void reset_history_pointer_for(const linestruct *list);
|
||||||
void update_history(linestruct **item, const char *text);
|
void update_history(linestruct **item, const char *text);
|
||||||
#ifdef ENABLE_TABCOMP
|
#ifdef ENABLE_TABCOMP
|
||||||
char *get_history_completion(linestruct **h, char *s, size_t len);
|
char *get_history_completion(linestruct **h, char *s, size_t len);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user