Only make the buffer with the lock unmodifiable

No need to lock all of Vim.