I don't know if this is going to work with Linux, it should since it is suppose to be the same
construct for the memo
SendMessage(Memo.Handle, EM_SCROLLCARET, 0,0);
In windows, that will scroll the window to show the caret, this is done after you set the
caret position.
Memo.SelStart := Length(Memo.Text);
SendMessage(Mem0.Handle, EM_SCROLLCARET, 0, 0);
In windows that scrolls the window like I said in view of the caret.