make cursor positioning by coordinates more intuitive

When clicking left or right of a line, the cursor should always be
positioned in that line (either at the beginning or end).

When clicking between structural elements, the cursor should be moved to
the beginning or end of the closest structural element.

Signed-off-by: Florian Thienel <>
4 files changed