Solomon dd56c813f9
preserve variable capture spans in blocks (#15334)
Closes #15160

# User-Facing Changes

Certain "variable not found" errors no longer highlight the surrounding
block.

Before:

```nushell
do {
  match foo {
    _ => $in
  }
}

Error: nu:🐚:variable_not_found

  × Variable not found
   ╭─[entry #1:1:1]
 1 │ ╭─▶ do {
 2 │ │     match foo {
 3 │ │       _ => $in
 4 │ │     }
 5 │ ├─▶ }
   · ╰──── variable not found
```

After:

```nushell
Error: nu:🐚:variable_not_found

  × Variable not found
   ╭─[entry #1:3:10]
 2 │   match foo {
 3 │     _ => $in
   ·          ─┬─
   ·           ╰── variable not found
```
2025-03-20 14:20:28 -04:00
..
2025-02-11 06:34:51 -06:00
2024-04-24 15:46:35 +00:00
2025-02-11 06:34:51 -06:00
2024-07-17 16:02:42 -05:00
2024-04-24 15:46:35 +00:00
2024-04-24 15:46:35 +00:00
2025-02-11 06:34:51 -06:00
2024-11-29 21:24:17 +00:00