Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
supermaven: Fix incorrect offset calculation (#17925)
Kevin Wangc48584fb7964
diff --git a/crates/supermaven/src/supermaven_completion_provider.rs b/crates/supermaven/src/supermaven_completion_provider.rsindex 41197717144..261ce372d9f 100644--- a/crates/supermaven/src/supermaven_completion_provider.rs+++ b/crates/supermaven/src/supermaven_completion_provider.rs@@ -77,10 +77,10 @@ fn completion_state_from_diff(snapshot.anchor_after(offset),completion_text[i..i + k].into(),));- offset.add_assign(j);}i += k + 1;j += 1;+ offset.add_assign(1);}None => {// there are no more matching completions, so drop the remaining