fix for slisson/mps-richtext#34 (Unable to add new line when cursor stands at the very end of the text)