pub fn insert(&mut self, offset: usize, byte: u8) {
        let window_end = self.window_end.load(Ordering::SeqCst);
        self.tx.send(EditMessage::Add(self.content_buf[window_end - 1])).unwrap();
        self.len += 1;

        unsafe {
            std::ptr::copy(
                self.content_buf.as_ptr().add(offset),
                self.content_buf.as_mut_ptr().add(offset + 1),
                window_end.saturating_sub(offset).saturating_sub(1),
            );
        }

        self.content_buf[offset] = byte;
    }
At the moment, only used for undoing deletions. With that in mind,
no need to worry about increasing the size of the buffer. Copies
up to the window so a single byte will be cut off at the end. Sends
this byte so the background thread can re-insert it once it is safe.
src/buffer.rs