diff --git a/crates/nu-parser/src/lex.rs b/crates/nu-parser/src/lex.rs index e374a29042..fb807e35da 100644 --- a/crates/nu-parser/src/lex.rs +++ b/crates/nu-parser/src/lex.rs @@ -280,7 +280,7 @@ pub fn lex( if !skip_comment { output.push(Token::new( TokenContents::Comment, - Span::new(start, curr_offset), + Span::new(span_offset + start, span_offset + curr_offset), )); } start = curr_offset;