If you use the terminal app a lot, you will know that you can press the up arrow to get to the last command you typed to save you typing it again (it saves a load of history for you so you can pick the command that you typed ten commands ago, etc) [and if you didnt know that, then you do now].
well, it turns out that you can do the same thing in imessages.
if you hold the alt key and press the up / down arrow then you can move backwards / forwards through your typed message history!