1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-16 02:27:32 -05:00

Revert "Bounds-check terminal selection when clearing scrollback."

This reverts commit 80f5a009f6.

After a bit more thought, I've decided it's the wrong way to solve the
problem. We shouldn't really be _changing_ the current selection
bounds in response to an event that touches the range they cover. With
this fix in place, if you clear the scrollback while a selection
partly overlaps it, and then extend the modified selection, you'll get
a selection one of whose endpoints is something you never specified as
a selection endpoint at all, and possibly paste the wrong text.

A better fix is to do the same thing we do about any other event that
touches the range covered by the selection: get rid of the selection
completely. For ease of cherry-picking (in case anyone needs to apply
the good fix in some downstream branch, or whatever), I'll make that
change separately in the next commit.
This commit is contained in:
Simon Tatham
2019-07-24 18:56:07 +01:00
parent 80f5a009f6
commit a6a13311b4
2 changed files with 0 additions and 28 deletions

View File

@ -475,9 +475,4 @@ static inline bool decpos_fn(pos *p, int cols)
#define incpos(p) incpos_fn(&(p), GET_TERM_COLS)
#define decpos(p) decpos_fn(&(p), GET_TERM_COLS)
static inline pos bound_pos(pos p, pos lo, pos hi)
{
return poslt(p, lo) ? lo : poslt(p, hi) ? p : hi;
}
#endif