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 3ad0a21 commit 645ec78Copy full SHA for 645ec78
src/uu/ptx/src/ptx.rs
@@ -751,6 +751,10 @@ fn write_traditional_output(
751
}
752
753
for word_ref in words {
754
+ // Since `ptx` accepts duplicate file arguments (e.g., `ptx file file`),
755
+ // simply looking up by filename is ambiguous.
756
+ // We use the `global_line_nr` (which is unique across the entire input stream)
757
+ // to identify which file covers this line.
758
let (_, file_map_value) = file_map
759
.iter()
760
.find(|(name, content)| {
0 commit comments