Handle virtual space properly

When the cursor is in virtual space and the user presses Backspace or
Delete, this replaces the virtual space with actual spaces.