1
0
mirror of https://github.com/nushell/nushell.git synced 2025-07-13 21:06:06 +02:00

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

* [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

@ -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 expr_first = expression.span.start;
let span_str = &line let span_str = &line
[expression.span.start - global_span_offset..expression.span.end - global_span_offset]; [expression.span.start - global_span_offset..expression.span.end - global_span_offset];