diff options
author | pommicket <pommicket@gmail.com> | 2023-08-05 15:01:38 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-08-05 15:01:38 -0400 |
commit | b65943698a241624973f3ab54530bb5d5884cff2 (patch) | |
tree | 07b519ae1a9f601894935ddfba2f968656302dd8 /command.c | |
parent | 0f38b14e10f553cb49a5da65125e21e1591cba3e (diff) |
internalize Autocomplete
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); |