Thanks Alexander Rezinsky <alexrez@gmail.com>!
void
selsnap(int mode, int *x, int *y, int direction) {
void
selsnap(int mode, int *x, int *y, int direction) {
switch(mode) {
case SNAP_WORD:
/*
switch(mode) {
case SNAP_WORD:
/*
+ /*
+ * Select the whole line when the end of line is reached.
+ */
+ if(direction > 0) {
+ i = term.col;
+ while(--i > 0 && term.line[*y][i].c[0] == ' ')
+ /* nothing */;
+ if(i > 0 && i < *x)
+ *x = term.col - 1;
+ }