Preserve half done messages in history with arrow down

This fixes #151, so that half-done messages are saved to history
on arrow down. It also ensures that the history index pointer doesn't 
get increased if you keep pressing arrow down at the end of the history.