terminal/src/cascadia
Don-Vito 83f2a3bb3d
Fix selection logic with shift on multi-click (#9403)
## PR Checklist
* [x] Closes https://github.com/microsoft/terminal/issues/9382
* [x] CLA signed. 
* [ ] Tests added/passed
* [ ] Documentation updated. 
* [ ] Schema updated.
* [ ] I've discussed this with core contributors already. 

## Detailed Description of the Pull Request / Additional comments
The selection with shift is quite broken in 1.6.

It started with #8611 that introduces cell selection on `shift+click`.
This change resulted in the following defect:
`shift+double-click`, `shift+triple-click` select only parts  of the word.
The reason for this is that the first `shift+click` establishes the selection,
while the consequent clicks simply extend it to the relevant boundary
(aka word / line boundary)

However, the logic was broken even before #8611.
For instance, `shift+triple-click` had exactly the same handicap:
`shift+double-click` was establishing the selection and the
third click was simply extending it to the line boundary.

This PR addresses the both defects in the following manner:
upon multi-click that starts new selection we establish
a new selection on every consequent click using appropriate mode
(cell/word/line) rather than trying to extend one.
For this purpose we remember the position that started the selection.
2021-03-08 19:15:46 +00:00
..
CascadiaPackage Add support for "fragment extensions" (#7632) 2021-02-19 02:12:16 +00:00
inc Replace some of our macros to reduce confusion, increase success (#9376) 2021-03-04 11:27:03 -08:00
LocalTests_SettingsModel Control 'Touch Keyboard and Handwriting Panel Service' warning (#9015) 2021-02-22 12:08:49 -08:00
LocalTests_TerminalApp Introduce duplicate tab menu (#9388) 2021-03-08 12:16:56 +00:00
PublicTerminalCore Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
Remoting Replace some of our macros to reduce confusion, increase success (#9376) 2021-03-04 11:27:03 -08:00
ShellExtension Replace some of our macros to reduce confusion, increase success (#9376) 2021-03-04 11:27:03 -08:00
TerminalApp Allow configuring suppressApplicationTitle in new tab/pane/window commands (#9392) 2021-03-08 15:23:50 +00:00
TerminalAzBridge Exclude more rarely-used stuff from Windows headers (#8513) 2020-12-11 19:35:23 +00:00
TerminalConnection make "open terminal here" context menu work for directory background (#8638) 2021-01-06 19:59:30 +00:00
TerminalControl Fix selection logic with shift on multi-click (#9403) 2021-03-08 19:15:46 +00:00
TerminalCore Add support for double-width/double-height lines in conhost (#8664) 2021-02-18 05:44:50 +00:00
TerminalSettingsEditor Represent font face as a combo box in SUI (#9275) 2021-03-08 16:45:12 +00:00
TerminalSettingsModel Allow configuring suppressApplicationTitle in new tab/pane/window commands (#9392) 2021-03-08 15:23:50 +00:00
UnitTests_Remoting Add support for the windowingBehavior setting (#9118) 2021-02-19 21:09:17 +00:00
UnitTests_TerminalCore Replace some of our macros to reduce confusion, increase success (#9376) 2021-03-04 11:27:03 -08:00
ut_app A bunch of test fixes (#9192) 2021-02-18 20:47:14 +00:00
WindowsTerminal Add centerOnLaunch setting (#9036) 2021-02-19 22:30:24 +00:00
WindowsTerminalUniversal Update Win32 Toolkit (6.1.2) and VCRT Forwarders (1.0.4) (#8501) 2020-12-10 01:30:00 +00:00
WinRTUtils Add support for the newWindow action (#9208) 2021-02-19 23:51:30 +00:00
WpfTerminalControl wpf: prevent a 0 size when VS builds the Terminal window too early (#9194) 2021-02-17 21:00:50 +00:00
WpfTerminalTestNetCore wpf: target netcoreapp3.1, clean up test project path (#8491) 2020-12-04 18:17:25 +00:00
wt Build and ship an actual binary named wt that just launches WT (#6860) 2020-07-10 22:41:37 +00:00
CascadiaResources.build.items Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00