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.
This commit is contained in:
Antonio Scandurra 2021-10-08 12:15:21 +02:00
parent 451f0e7adb
commit 18e5d75fd3

View file

@ -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,