Retain selection's head (as opposed to its end) on insertion
This makes a difference when an edit spans two excerpts and the selection start won't necessarily be the same as the selection end after the edit.
This commit is contained in:
parent
23836eb251
commit
e46d1549d6
1 changed files with 1 additions and 1 deletions
|
@ -2382,7 +2382,7 @@ impl Editor {
|
|||
old_selections
|
||||
.iter()
|
||||
.map(|s| {
|
||||
let anchor = snapshot.anchor_after(s.end);
|
||||
let anchor = snapshot.anchor_after(s.head());
|
||||
s.map(|_| anchor)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue