We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a842b0 commit e4b2f58Copy full SHA for e4b2f58
src/types.rs
@@ -951,11 +951,12 @@ impl SourceMap {
951
let name = original.get_name(token.name_id);
952
let source = original.get_source(token.src_id);
953
954
- if let Some(source) = source {
955
- let contents = original.get_source_contents(token.src_id);
956
-
957
- let new_id = builder.add_source(source);
958
- builder.set_source_contents(new_id, contents);
+ if !builder.has_source_contents(token.src_id) {
+ if let Some(source) = source {
+ let contents = original.get_source_contents(token.src_id);
+ let new_id = builder.add_source(source);
+ builder.set_source_contents(new_id, contents);
959
+ }
960
}
961
962
let dst_line = (token.dst_line as i32 + line_diff) as u32;
0 commit comments