When editing, properly invalidate trees that depend on get_column

This commit is contained in:
Max Brunsfeld 2021-03-11 14:46:13 -08:00
parent e29d3714f7
commit a40045a419
8 changed files with 136 additions and 35 deletions

View file

@ -92,7 +92,7 @@ bool tree_sitter_uses_current_column_external_scanner_scan(
// If at the end of a statement, then get the current indent
// level and pop some number of entries off of the indent stack.
if (valid_symbols[NEWLINE] || valid_symbols[DEDENT]) {
while (lexer->lookahead == ' ') {
while (iswspace(lexer->lookahead) && lexer->lookahead != '\n') {
lexer->advance(lexer, false);
}