Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make selection an exclusive range #18106

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
aa95790
[AtlasEngine] Render selection as exclusive range
carlos-zamora Oct 15, 2024
4697f49
Fix any side-effects of making GetText exclusive
carlos-zamora Oct 15, 2024
4364643
Update selection markers appropriately
carlos-zamora Oct 15, 2024
014f338
[Mark Mode] Move by character (includes wide-glyph handling)
carlos-zamora Oct 16, 2024
ba673a4
[Mark Mode] Move by viewport
carlos-zamora Oct 16, 2024
cd2da0e
[Mark Mode] Move by buffer
carlos-zamora Oct 16, 2024
ff45eb9
[Mark Mode] Move by word
carlos-zamora Oct 17, 2024
659cd02
[Mark Mode] Handle move up/down onto middle of emoji
carlos-zamora Oct 17, 2024
e7ca807
Bugfix: renderer highlights lines when at x-boundary
carlos-zamora Oct 18, 2024
7ff4838
Bugfix: move to next word would move past mutable bottom
carlos-zamora Oct 18, 2024
928e9a9
Fix some more rendering issues
carlos-zamora Oct 21, 2024
9d361d2
Fix more rendering issues w/ Leonard
carlos-zamora Oct 21, 2024
845e43d
Fix highlighting in AtlasEngine
lhecker Oct 22, 2024
8b996a9
fix session restore
carlos-zamora Oct 22, 2024
df89ad0
Ensure mouse selection scenarios work right
carlos-zamora Oct 23, 2024
9e9db42
Fix UIA
carlos-zamora Oct 23, 2024
eea8399
Fix hyperlinks
carlos-zamora Oct 23, 2024
7bfd647
fix tests
carlos-zamora Oct 24, 2024
52f3bc0
fix other tests
carlos-zamora Nov 5, 2024
408d149
spell
carlos-zamora Nov 5, 2024
57b82cb
[UIA] allow end exclusive
carlos-zamora Nov 6, 2024
e98033e
audit
carlos-zamora Nov 6, 2024
e621c1c
fix some more tests
carlos-zamora Nov 7, 2024
83d2bff
apply feedback
carlos-zamora Nov 8, 2024
6aed5f9
Fix shift+tab to select hyperlink
carlos-zamora Nov 15, 2024
7a8d448
Fix ConHost
carlos-zamora Nov 15, 2024
6b99816
Fix 'off by 1' hyperlink detection
carlos-zamora Nov 15, 2024
d179e9c
bugfix: don't select trailing whitespace with mouse word selection
carlos-zamora Nov 26, 2024
d2ed09e
bugfix: click+drag on cell should select the cell we're on
carlos-zamora Nov 26, 2024
37ad74f
bugfix: double-click + drag would prematurely expand
carlos-zamora Dec 3, 2024
dbfdf81
fix tests; fix conhost block selection
carlos-zamora Dec 3, 2024
bee9371
fix terminal core selection tests
carlos-zamora Dec 3, 2024
44a1e42
fix tests and add more comments to preserve sanity
carlos-zamora Dec 14, 2024
4764653
simplify and add comment
carlos-zamora Dec 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/spelling/expect/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ CBN
cbt
Ccc
CCCBB
CCCDDD
cch
CCHAR
CCmd
Expand Down Expand Up @@ -365,6 +366,7 @@ dcommon
dcompiler
DComposition
dde
DDDCCC
DDESHARE
DDevice
DEADCHAR
Expand Down
3 changes: 3 additions & 0 deletions src/buffer/out/Row.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1114,6 +1114,9 @@ std::wstring_view ROW::GetText() const noexcept
return { _chars.data(), width };
}

// Arguments:
// - columnBegin: inclusive
// - columnEnd: exclusive
std::wstring_view ROW::GetText(til::CoordType columnBegin, til::CoordType columnEnd) const noexcept
{
const auto columns = GetReadableColumnCount();
Expand Down
5 changes: 1 addition & 4 deletions src/buffer/out/UTextAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,10 +417,7 @@ til::point_span Microsoft::Console::ICU::BufferRangeFromMatch(UText* ut, URegula
{
UErrorCode status = U_ZERO_ERROR;
const auto nativeIndexBeg = uregex_start64(re, 0, &status);
auto nativeIndexEnd = uregex_end64(re, 0, &status);

// The parameters are given as a half-open [beg,end) range, but the point_span we return in closed [beg,end].
carlos-zamora marked this conversation as resolved.
Show resolved Hide resolved
nativeIndexEnd--;
const auto nativeIndexEnd = uregex_end64(re, 0, &status);

const auto& textBuffer = *static_cast<const TextBuffer*>(ut->context);
til::point_span ret;
Expand Down
Loading
Loading