Fix bug with alias handling when searching for matching brackets (#6931)

* [4325] - fix slicing

* [4325] - fix style
This commit is contained in:
Max Zhuravsky 2022-10-29 00:21:24 +03:00 committed by GitHub
parent b56e603c58
commit 3b26b4355e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -268,7 +268,8 @@ fn find_matching_block_end_in_expr(
};
}
if expression.span.contains(global_cursor_offset) {
if expression.span.contains(global_cursor_offset) && expression.span.start >= global_span_offset
{
let expr_first = expression.span.start;
let span_str = &line
[expression.span.start - global_span_offset..expression.span.end - global_span_offset];