From 62ef0bc0ab5f80da1f71cb3005230eeb02f1d82b Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Mon, 16 Jan 2023 00:56:57 +0100 Subject: [PATCH] correctly track char_pos for virtual text --- helix-core/src/doc_formatter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-core/src/doc_formatter.rs b/helix-core/src/doc_formatter.rs index be83cd88cca0a..50ba3e7d0d12e 100644 --- a/helix-core/src/doc_formatter.rs +++ b/helix-core/src/doc_formatter.rs @@ -168,7 +168,7 @@ impl<'t> DocumentFormatter<'t> { annotations, visual_pos: Position { row: 0, col: 0 }, graphemes: RopeGraphemes::new(text.slice(block_char_idx..)), - char_pos: 0, + char_pos: block_char_idx, exhausted: false, virtual_lines: 0, indent_level: None,