summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-20 21:54:52 -0500
committerpommicket <pommicket@gmail.com>2022-12-20 21:54:52 -0500
commit7568add9317f2bad5f633e5c587c76b87175899f (patch)
treef758573c4f3fdd6ecb7ebde4fb17314b51ad3b2f /command.c
parent885df8890e537383df71f8f828444d6c5cce0243 (diff)
autocomplete very broken but kinda working
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 81a712c..5ed30b7 100644
--- a/command.c
+++ b/command.c
@@ -127,7 +127,7 @@ void command_execute(Ted *ted, Command c, i64 argument) {
buffer = &ted->line_buffer;
ted_switch_to_buffer(ted, buffer);
buffer_select_all(buffer);
- } else if (ted->autocomplete) {
+ } else if (ted->autocomplete.open) {
autocomplete_select_cursor_completion(ted);
} else if (buffer) {
if (buffer->selection)
@@ -263,13 +263,13 @@ void command_execute(Ted *ted, Command c, i64 argument) {
}
break;
case CMD_AUTOCOMPLETE:
- if (ted->autocomplete)
+ if (ted->autocomplete.open)
autocomplete_next(ted);
else
autocomplete_open(ted);
break;
case CMD_AUTOCOMPLETE_BACK:
- if (ted->autocomplete)
+ if (ted->autocomplete.open)
autocomplete_prev(ted);
break;
@@ -376,7 +376,7 @@ void command_execute(Ted *ted, Command c, i64 argument) {
if (*ted->error_shown) {
// dismiss error box
*ted->error_shown = '\0';
- } else if (ted->autocomplete) {
+ } else if (ted->autocomplete.open) {
autocomplete_close(ted);
} else if (ted->menu) {
menu_escape(ted);