summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-12-23 13:07:37 -0500
committerpommicket <pommicket@gmail.com>2022-12-23 13:07:37 -0500
commit7bf8860601771be812e72c557fe9681c968bceaf (patch)
tree035f7a767628daf8cdda1160555f39a8cfc698b7 /main.c
parente4774c14963bf51840bbf940c1181fe7fc7c3046 (diff)
identifier-trigger-characters setting
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.c b/main.c
index 26195f5..edb8b11 100644
--- a/main.c
+++ b/main.c
@@ -1,7 +1,7 @@
/*
@TODO:
- fix unicode_utf8_to_utf32 to handle bad UTF-8 (i.e. continuation bytes which aren't actually continuation bytes)
-- provide completion context?
+- provide completion context + don't flash cursor for triggers with no completions
- dont do completion if provides_completion = false
- scroll through completions
- only show "Loading..." if it's taking some time (prevent flash)
@@ -836,6 +836,10 @@ int main(int argc, char **argv) {
break;
}
}
+
+ if (settings->identifier_trigger_characters && is_word(last_char)
+ && !is_digit(last_char))
+ autocomplete_open(ted);
}
}