forked from extern/nushell
Allow viewing the source code of blocks (#894)
* Add spans to blocks and view command * Better description; Cleanup * Rename "view" command to "view-source"
This commit is contained in:
@ -761,7 +761,7 @@ pub fn parse_module_block(
|
||||
}
|
||||
}
|
||||
|
||||
let mut overlay = Overlay::new();
|
||||
let mut overlay = Overlay::from_span(span);
|
||||
|
||||
let block: Block = output
|
||||
.block
|
||||
|
@ -2956,6 +2956,7 @@ pub fn parse_block_expression(
|
||||
let captures = find_captures_in_block(working_set, &output, &mut seen, &mut seen_decls);
|
||||
|
||||
output.captures = captures;
|
||||
output.span = Some(span);
|
||||
|
||||
working_set.exit_scope();
|
||||
|
||||
|
Reference in New Issue
Block a user