From 18e5d75fd3d42e28f5e96296c941a04ec19f59f1 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 8 Oct 2021 12:15:21 +0200 Subject: [PATCH] Bias the start of an autoindent request towards the right for new text When a newline is inserted, this prevents the request from including the line on which the newline got inserted. --- crates/buffer/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/buffer/src/lib.rs b/crates/buffer/src/lib.rs index 2d145f52e4..3d4f6bafdd 100644 --- a/crates/buffer/src/lib.rs +++ b/crates/buffer/src/lib.rs @@ -1536,7 +1536,7 @@ impl Buffer { let ranges = edit.ranges.iter().map(|range| { Anchor { offset: range.start, - bias: Bias::Left, + bias: Bias::Right, version: edit.version.clone(), }..Anchor { offset: range.end,