Make selection consistent over line breaks.

Currently, selection is expanded to the end of the line over line breaks only in
regular selection mode, when the line in not empty and when going down and/or
right. This covers all the cases including word selection mode, with the
exception of rectangular selection because it would make this mode too rigid.
This adjustment is made in selsort so I renamed it to selnormalize to better
reflect what it does now.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
tiny cleanup

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Fix rectangular selection.

selsort computes the wrong normalized coordinates when rectangular
selection is enabled, causing rectangular selection to only work
when going toward either the top left corner, or the bottom right
one.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Refactor selsnap SNAP_WORD.

Refactor the SNAP_WORD part in selsnap, and fix a bug that caused the word
delimiters to be ignored if it was at the very beginning or end of a wrapped
line.

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Merge branch 'master' into workspace
Remove unnecessary typedef

This should also fix compiling-errors on OpenBSD,
as reported by Nils R. Thanks!

Signed-off-by: Roberto E. Vargas Caballero <k0ga@shike2.com>
Simplify tdeftrans
Style police.
Merge branch 'master' into workspace