simon-git: putty (master): Simon Tatham
Commits to Tartarus hosted VCS
tartarus-commits at lists.tartarus.org
Wed Jul 24 19:18:48 BST 2019
TL;DR:
a6a13311 Revert "Bounds-check terminal selection when clearing scrollback."
5e2ac205 term_clrsb(): call deselect() if the selection was affected.
Repository: https://git.tartarus.org/simon/putty.git
On the web: https://git.tartarus.org/?p=simon/putty.git
Branch updated: master
Committer: Simon Tatham <anakin at pobox.com>
Date: 2019-07-24 19:18:48
commit a6a13311b4e63c735cac9d6ac9ecedad752d31d7
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=a6a13311b4e63c735cac9d6ac9ecedad752d31d7;hp=80f5a009f647aacd492c6e1e7a5f450156cabe13
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jul 24 18:56:07 2019 +0100
Revert "Bounds-check terminal selection when clearing scrollback."
This reverts commit 80f5a009f647aacd492c6e1e7a5f450156cabe13.
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.
terminal.c | 23 -----------------------
terminal.h | 5 -----
2 files changed, 28 deletions(-)
commit 5e2ac205fd5dab8f2bb306ed66d12237ff51c3f7
web diff https://git.tartarus.org/?p=simon/putty.git;a=commitdiff;h=5e2ac205fd5dab8f2bb306ed66d12237ff51c3f7;hp=a6a13311b4e63c735cac9d6ac9ecedad752d31d7
Author: Simon Tatham <anakin at pobox.com>
Date: Wed Jul 24 19:00:52 2019 +0100
term_clrsb(): call deselect() if the selection was affected.
Any terminal event that modifies the range of screen+scrollback
currently covered by the mouse selection should call deselect(), so
that users won't be misled into thinking that the new version of the
highlighted text would be pasted, and also so that using the
MBT_EXTEND action to modify the selection bounds won't start from
a selection you never had in the first place.
Clearing the scrollback is such an event, if the selection covered any
of the scrollback at all; so we should apply the same policy here as
everywhere else.
terminal.c | 7 +++++++
1 file changed, 7 insertions(+)
More information about the tartarus-commits
mailing list