summary |
log |
commit |
diff |
tree
raw |
patch |
inline | side by side (from parent 1:
5938fa9)
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;
+ }