From c4d314d7ba8a751c056b7cb12edb853b9c6c0e26 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Thu, 6 Mar 2025 17:13:31 -0500 Subject: [PATCH] LSP: Fix offset encoding test case Co-authored-by: Isaac Mills --- helix-lsp/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index df57bbe8c..ba41cbc5a 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -1032,7 +1032,8 @@ mod tests { let mut source = Rope::from_str("[\n\"πŸ‡ΊπŸ‡Έ\",\n\"πŸŽ„\",\n]"); - let transaction = generate_transaction_from_edits(&source, edits, OffsetEncoding::Utf8); + let transaction = generate_transaction_from_edits(&source, edits, OffsetEncoding::Utf16); assert!(transaction.apply(&mut source)); + assert_eq!(source, "[\n \"πŸ‡ΊπŸ‡Έ\",\n \"πŸŽ„\",\n]"); } }