on master help sign in
Display line-feed as instead of
commit50dc4a79b01296701eb4b39ccf430405ed27de44 authorsharkdp <davidpeter@web.de> dateThu 1 Nov 2018, 19:54 (8 years ago) parent8fa8f44
2 files changed+5−5
assets/syntaxes/show-nonprintable.sublime-syntax+2−2 src/preprocessor.rs+3−3
assets/syntaxes/show-nonprintable.sublime-syntax+2−2
@@ -13,8 +13,8 @@ contexts:
1313 scope: constant.character.escape.show-nonprintable.tab
1414 - match: "↹"
1515 scope: constant.character.escape.show-nonprintable.tab
16− - match: "␤"
17− scope: keyword.operator.show-nonprintable.newline
16+ - match: "␊"
17+ scope: keyword.operator.show-nonprintable.line-feed
1818 - match: "␍"
1919 scope: string.show-nonprintable.carriage-return
2020 - match: "␀"
src/preprocessor.rs+3−3
@@ -52,10 +52,10 @@ pub fn replace_nonprintable(input: &mut Vec<u8>, output: &mut Vec<u8>, tab_width
5252 output.extend_from_slice("┤".as_bytes());
5353 }
5454 }
55− // new line
56− b'\n' => output.extend_from_slice("␤".as_bytes()),
55+ // line feed
56+ 0x0A => output.extend_from_slice("␊".as_bytes()),
5757 // carriage return
58− b'\r' => output.extend_from_slice("␍".as_bytes()),
58+ 0x0D => output.extend_from_slice("␍".as_bytes()),
5959 // null
6060 0x00 => output.extend_from_slice("␀".as_bytes()),
6161 // bell