Skip to content

Commit

Permalink
fix tweak for wrap/resize/copy handling (#800, ~#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
mintty committed Sep 21, 2018
1 parent 78813a9 commit 806b50e
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/termclip.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,18 +89,11 @@ get_selection(pos start, pos end, bool rect, bool allinline)
else {
/* Strip added space in wrapped line after window resizing */
//printf("wr x %d w %d\n", nlpos.x, line->wrappos);
while (nlpos.x > line->wrappos + 1 &&
while (nlpos.x > line->wrappos + !(line->lattr & LATTR_WRAPPED2) &&
line->chars[nlpos.x - 1].chr == ' ' &&
!line->chars[nlpos.x - 1].cc_next && poslt(start, nlpos))
decpos(nlpos);
//printf("-> x %d w %d\n", nlpos.x, line->wrappos);
#ifdef not_needed_anymore
if (line->lattr & LATTR_WRAPPED2) {
//printf("wr2 x %d-- w %d\n", nlpos.x, line->wrappos);
/* Ignore the last char on the line in a WRAPPED2 line. */
decpos(nlpos);
}
#endif
}

/*
Expand Down

0 comments on commit 806b50e

Please sign in to comment.