summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-23 14:48:32 -0500
committerpommicket <pommicket@gmail.com>2022-12-23 14:48:32 -0500
commitdbab768e4d0be378e65399f32f26edb4756533ce (patch)
tree7cd92c46903df99c1c3ad084d2eab0013f67c4ab /main.c
parent002215c37f6a1ced083c78b7c9b6f86f472b23cd (diff)
completion context + don't flash cursor if trigger character
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/main.c b/main.c
index edb8b11..7460e2b 100644
--- a/main.c
+++ b/main.c
@@ -1,10 +1,8 @@
/*
@TODO:
-- fix unicode_utf8_to_utf32 to handle bad UTF-8 (i.e. continuation bytes which aren't actually continuation bytes)
-- provide completion context + don't flash cursor for triggers with no completions
+- only show "Loading..." if it's taking some time (prevent flash)
- dont do completion if provides_completion = false
- scroll through completions
-- only show "Loading..." if it's taking some time (prevent flash)
- LSP setting
- figure out workspace
- make sure "save as" works
@@ -832,14 +830,14 @@ int main(int argc, char **argv) {
strlen(text) - last_code_point);
arr_foreach_ptr(lsp->trigger_chars, char32_t, c) {
if (*c == last_char) {
- autocomplete_open(ted);
+ autocomplete_open(ted, last_char);
break;
}
}
if (settings->identifier_trigger_characters && is_word(last_char)
&& !is_digit(last_char))
- autocomplete_open(ted);
+ autocomplete_open(ted, last_char);
}
}