refactoring set positon to the clicked line in textarea.