vim: Don’t allow edits in the read-only state (#10404)
Fix #8423 Release Notes: - vim: Fixed vim-surround motions editing read-only buffer (preview-only)
This commit is contained in:
parent
3ab9700155
commit
32806b8320
1 changed files with 3 additions and 0 deletions
|
@ -418,6 +418,9 @@ impl MultiBuffer {
|
||||||
S: ToOffset,
|
S: ToOffset,
|
||||||
T: Into<Arc<str>>,
|
T: Into<Arc<str>>,
|
||||||
{
|
{
|
||||||
|
if self.read_only() {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if self.buffers.borrow().is_empty() {
|
if self.buffers.borrow().is_empty() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue