Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

802 fix color moved side by side panic #803

Merged
merged 3 commits into from
Nov 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions etc/examples/72-color-moved-4.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
diff --git a/file.py b/file.py
index f2f1f5e..9735c3a 100644
--- a/file.py
+++ b/file.py
@@ -1,2 +1,2 @@
-class X: pass # • unicode
class Y: pass # • unicode
+class X: pass # • unicode
12 changes: 12 additions & 0 deletions etc/examples/802-color-moved.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
commit 57e5082
Author: Caleb Maclennan <caleb@alerque.com>
Date: Sat Nov 27 01:08:54 2021 +0300

Move verses to correct week file

diff --git a/foo.md b/foo.md
index ba489f0..0ad8245 100644
--- a/foo.md
+++ b/foo.md
@@ -20,3 +20,99 @@ foo bar
+As I swore in my wrath, 'They shall not enter my rest.'"
8 changes: 6 additions & 2 deletions src/paint.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,13 @@ impl<'p> Painter<'p> {
}
}

// Remove initial -/+ character, and expand tabs as spaces, retaining ANSI sequences.
// Remove initial -/+ character, expand tabs as spaces, retaining ANSI sequences. Terminate with
// newline character.
pub fn prepare_raw_line(&self, raw_line: &str) -> String {
ansi::ansi_preserving_slice(&self.expand_tabs(raw_line.graphemes(true)), 1)
format!(
"{}\n",
ansi::ansi_preserving_slice(&self.expand_tabs(raw_line.graphemes(true)), 1),
)
}

/// Expand tabs as spaces.
Expand Down