vim: Fix readonly mode (#20264)

Closes #18854

Release Notes:

- vim: Fixed `r`, `~` etc. appearing to modify readonly buffers
This commit is contained in:
Conrad Irwin 2024-11-05 21:45:45 -07:00 committed by GitHub
parent c10c35ffda
commit 803e5d4c9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 37 deletions

View file

@ -439,9 +439,7 @@ impl Vim {
))
}
editor.buffer().update(cx, |buffer, cx| {
buffer.edit(edits, None, cx);
});
editor.edit(edits, cx);
editor.set_clip_at_line_ends(true, cx);
editor.change_selections(None, cx, |s| {
s.move_with(|map, selection| {