We don’t write anything more to the buffer after this, but this makes
this code consistent with all other code that pushes new data to the
buffer.
This makes it easier to search, and validate, the
ensure_size()+push-data pattern.
‘idx’ is where _new_ data should be pushed into the buffer. Thus it is
perfectly valid for it to be equal to ‘size’ - it just means we need
to allocate more space before pushing data to it.
When enabled, the mouse cursor is hidden when the user types in the
terminal. It is un-hidden when the user moves the mouse, or when the
window loses keyboard focus.
This allows us to safely call extract_finish() when extract_one()
failed, and we'll get the expected result; false, indicating
extract_finish() failed.