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>
This commit is contained in:
Internal Server Error - Gitea: Git with a cup of tea and freedom
500 Internal Server Error

Gitea Version: 1.28.0+dev-505-g31b4d79a84