nushell/crates/nu-engine/src
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
..
compile Rework operator type errors (#14429) 2025-02-12 20:03:40 -08:00
call_ext.rs Remove duplicate implementations of CallExt::rest (#14484) 2024-12-01 15:03:45 +01:00
closure_eval.rs Make timeit take only closures as an argument (#14483) 2024-12-10 23:08:53 +08:00
column.rs Use Record's public API in a bunch of places (#10927) 2023-11-08 14:24:00 +01:00
command_prelude.rs More precise ErrorKind::NotFound errors (#15149) 2025-02-22 11:42:44 -05:00
documentation.rs finish removing terminal_size dep (#14819) 2025-01-13 07:00:21 -06:00
env.rs More precise ErrorKind::NotFound errors (#15149) 2025-02-22 11:42:44 -05:00
eval_helpers.rs Error on non-zero exit statuses (#13515) 2024-09-07 06:44:26 +00:00
eval_ir.rs preserve variable capture spans in blocks (#15334) 2025-03-20 14:20:28 -04:00
eval.rs preserve variable capture spans in blocks (#15334) 2025-03-20 14:20:28 -04:00
exit.rs Jobs (#14883) 2025-02-25 12:09:52 -05:00
glob_from.rs check signals in nu-glob and ls (#15140) 2025-02-28 19:36:39 +01:00
lib.rs Jobs (#14883) 2025-02-25 12:09:52 -05:00
scope.rs Custom command attributes (#14906) 2025-02-11 06:34:51 -06:00