Fix "text is read-only" error

This error would occur when I copied text from a buffer that had the
read-only text property set.