From 7a87315b940ae7b8a38e83bddedd8f8b908c4c7c Mon Sep 17 00:00:00 2001 From: sharkdp Date: Wed, 22 Apr 2020 20:53:53 +0200 Subject: [PATCH] Fix #937 --- CHANGELOG.md | 4 +++- src/printer.rs | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3df43da..f272e1d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,9 +24,11 @@ - Performance problems with C# source code have been fixed, see #677 (@keith-hall) - Performance problems with Makefiles have been fixed, see #750 (@keith-hall) -- Fig bux when highlighting Ruby files with unindented heredocs, see #914 (@keith-hall) +- Fix bug when highlighting Ruby files with unindented heredocs, see #914 (@keith-hall) - A highlighting problem with Rust source code has been fixed, see #924 (@keith-hall) - Windows: short files that do not require paging are displayed and then lost, see #887 +- `--highlight-line` did not work correctly in combination with `--tabs=0` and `--wrap=never`, + see #937 ## Other diff --git a/src/printer.rs b/src/printer.rs index 4f7fcae9..cdd1d8b0 100644 --- a/src/printer.rs +++ b/src/printer.rs @@ -223,6 +223,7 @@ impl<'a> InteractivePrinter<'a> { if self.config.tab_width > 0 { expand_tabs(text, self.config.tab_width, cursor) } else { + *cursor += text.len(); text.to_string() } }