diff options
| -rw-r--r-- | st.c | 7 |
1 files changed, 2 insertions, 5 deletions
| @@ -752,7 +752,7 @@ bpress(XEvent *e) { | |||
| 752 | void | 752 | void |
| 753 | selcopy(void) { | 753 | selcopy(void) { |
| 754 | char *str, *ptr; | 754 | char *str, *ptr; |
| 755 | int x, y, bufsize, isselected = 0, size; | 755 | int x, y, bufsize, size; |
| 756 | Glyph *gp, *last; | 756 | Glyph *gp, *last; |
| 757 | 757 | ||
| 758 | if(sel.bx == -1) { | 758 | if(sel.bx == -1) { |
| @@ -763,7 +763,6 @@ selcopy(void) { | |||
| 763 | 763 | ||
| 764 | /* append every set & selected glyph to the selection */ | 764 | /* append every set & selected glyph to the selection */ |
| 765 | for(y = sel.b.y; y < sel.e.y + 1; y++) { | 765 | for(y = sel.b.y; y < sel.e.y + 1; y++) { |
| 766 | isselected = 0; | ||
| 767 | gp = &term.line[y][0]; | 766 | gp = &term.line[y][0]; |
| 768 | last = gp + term.col; | 767 | last = gp + term.col; |
| 769 | 768 | ||
| @@ -774,8 +773,6 @@ selcopy(void) { | |||
| 774 | for(x = 0; gp <= last; x++, ++gp) { | 773 | for(x = 0; gp <= last; x++, ++gp) { |
| 775 | if(!selected(x, y)) { | 774 | if(!selected(x, y)) { |
| 776 | continue; | 775 | continue; |
| 777 | } else { | ||
| 778 | isselected = 1; | ||
| 779 | } | 776 | } |
| 780 | 777 | ||
| 781 | size = utf8size(gp->c); | 778 | size = utf8size(gp->c); |
| @@ -792,7 +789,7 @@ selcopy(void) { | |||
| 792 | * st. | 789 | * st. |
| 793 | * FIXME: Fix the computer world. | 790 | * FIXME: Fix the computer world. |
| 794 | */ | 791 | */ |
| 795 | if(isselected && y < sel.e.y) | 792 | if(y < sel.e.y) |
| 796 | *ptr++ = '\n'; | 793 | *ptr++ = '\n'; |
| 797 | } | 794 | } |
| 798 | *ptr = 0; | 795 | *ptr = 0; |
