Issue #30: set cursor to the end of line when entering edit mode