summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-05 15:01:38 -0400
committerpommicket <pommicket@gmail.com>2023-08-05 15:01:38 -0400
commitb65943698a241624973f3ab54530bb5d5884cff2 (patch)
tree07b519ae1a9f601894935ddfba2f968656302dd8 /command.c
parent0f38b14e10f553cb49a5da65125e21e1591cba3e (diff)
internalize Autocomplete
Diffstat (limited to 'command.c')
-rw-r--r--command.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/command.c b/command.c
index c09e0fd..8611f3e 100644
--- a/command.c
+++ b/command.c
@@ -332,7 +332,7 @@ void command_execute_ex(Ted *ted, Command c, const CommandArgument *full_argumen
buffer = &ted->line_buffer;
ted_switch_to_buffer(ted, buffer);
buffer_select_all(buffer);
- } else if (ted->autocomplete.open || ted->autocomplete.phantom) {
+ } else if (autocomplete_is_open(ted) || autocomplete_has_phantom(ted)) {
autocomplete_select_completion(ted);
} else if (buffer) {
if (buffer->selection)
@@ -476,13 +476,13 @@ void command_execute_ex(Ted *ted, Command c, const CommandArgument *full_argumen
}
break;
case CMD_AUTOCOMPLETE:
- if (ted->autocomplete.open)
+ if (autocomplete_is_open(ted))
autocomplete_next(ted);
else
autocomplete_open(ted, TRIGGER_INVOKED);
break;
case CMD_AUTOCOMPLETE_BACK:
- if (ted->autocomplete.open)
+ if (autocomplete_is_open(ted))
autocomplete_prev(ted);
break;
case CMD_GOTO_DEFINITION:
@@ -624,7 +624,7 @@ void command_execute_ex(Ted *ted, Command c, const CommandArgument *full_argumen
if (*ted->message_shown) {
// dismiss message box
*ted->message_shown = '\0';
- } else if (ted->autocomplete.open) {
+ } else if (autocomplete_is_open(ted)) {
autocomplete_close(ted);
} else if (ted->menu) {
menu_escape(ted);