Replies: 1 comment
-
I'm not reproing the issue with code int eaccess;
int main()
{
if (true)
{
return 0;
}
else
} Can you provide some sample repro code? With the repro code above I see that typing "e" brings both "eaccess" and "else" into the list, so typing the remaining "lse" resolves to "else" being used. It sounds like you're hitting a scenario where "else" is not in the completion list? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
If I type quickly "else" followed by a newline I get "eaccess" injected by the autocomplete, no indent correction, and no newline.
Yes, if I wait, I will get "else" offered as the first choice, but then this impacts my typing speed, as does putting up the wrong word, of course.
I guess the intelisense is looking to see if else is valid at the current code context, which takes time.
Clearly "eaccess" is being pulled from the many linux and other system headers that I have included.
Perhaps it is the number of headers or the size of the source file (today's file is 1500 lines)? Or perhaps I am pressing enter before the list has scrolled the rest of the letters of else?
(yes, I did type it correctly. Hitting undo restores the word "else")
But surely a language reserved word should always be offered first? If it takes time to decide if reserved words are correct in context, perhaps they should all be permitted initially, then excluded when the decision is that they are out of context?
Is there some way to prioritise language reserved words? And then there is the question of the newline that was consumed.
Alternatively, can I set the autocomplete to be only on-demand with a key press?
/Gem
Beta Was this translation helpful? Give feedback.
All reactions