diff options
| -rw-r--r-- | st.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -772,15 +772,15 @@ selsnap(int *x, int *y, int direction) { | |||
| 772 | * previous line will be selected. | 772 | * previous line will be selected. |
| 773 | */ | 773 | */ |
| 774 | *x = (direction < 0) ? 0 : term.col - 1; | 774 | *x = (direction < 0) ? 0 : term.col - 1; |
| 775 | if(direction < 0 && *y > 0) { | 775 | if(direction < 0) { |
| 776 | for(; *y > 0; *y += direction) { | 776 | for(; *y > 0; *y += direction) { |
| 777 | if(!(term.line[*y-1][term.col-1].mode | 777 | if(!(term.line[*y-1][term.col-1].mode |
| 778 | & ATTR_WRAP)) { | 778 | & ATTR_WRAP)) { |
| 779 | break; | 779 | break; |
| 780 | } | 780 | } |
| 781 | } | 781 | } |
| 782 | } else if(direction > 0 && *y < term.row-1) { | 782 | } else if(direction > 0) { |
| 783 | for(; *y < term.row; *y += direction) { | 783 | for(; *y < term.row-1; *y += direction) { |
| 784 | if(!(term.line[*y][term.col-1].mode | 784 | if(!(term.line[*y][term.col-1].mode |
| 785 | & ATTR_WRAP)) { | 785 | & ATTR_WRAP)) { |
| 786 | break; | 786 | break; |
