Set cursor at end in console while navigating with up/down key

When using CodeMirror in console, set cursor at end while navigating in history with up/down key.

If CodeMirror is not used, textarea automatically sets cursor at end.