mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 11:22:30 +01:00
correctly handle multiple tabs in one line
This commit is contained in:
committed by
David Peter
parent
67124f8513
commit
e7df748b6d
@@ -66,6 +66,7 @@ pub fn replace_nonprintable(input: &[u8], tab_width: usize) -> String {
|
||||
// tab
|
||||
'\t' => {
|
||||
let tab_stop = tab_width - ((line_idx - 1) % tab_width);
|
||||
line_idx = 0;
|
||||
if tab_stop == 1 {
|
||||
output.push('↹');
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user