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:
@@ -418,6 +418,9 @@ impl MultiBuffer {
|
||||
S: ToOffset,
|
||||
T: Into<Arc<str>>,
|
||||
{
|
||||
if self.read_only() {
|
||||
return;
|
||||
}
|
||||
if self.buffers.borrow().is_empty() {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user