Commit 70d1978
committed
editor: Fix
We've been seeing the occasional `cannot seek backwards` panic within
`SelectionsCollection` without means to reproduce.
I believe the cause is one of the callers of
`MutableSelectionsCollection::select` not passing a well formed
`Selection` where `start > end`, so this PR enforces the invariant in
`select` by swapping the fields and setting `reversed` as required as
the other mutator functions already do that as well.
We could also just assert this instead, but it callers usually won't
care about this so its the less user facing annoyance to just fix this
invariant up internally.
Fixes ZED-253
Fixes ZED-ZJ
Fixes ZED-23S
Fixes ZED-222
Fixes ZED-1ZV
Fixes ZED-1SN
Fixes ZED-1Z0
Fixes ZED-10E
Fixes ZED-1X0
Fixes ZED-12M
Fixes ZED-1GR
Fixes ZED-1VE
Fixes ZED-13X
Fixes ZED-1G4
Release Notes:
- Fixed occasional panics when querying selectionsSelectionsCollection::disjoint not being ordered correctly (#40249)1 parent 10c540b commit 70d1978
1 file changed
+20
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
610 | 610 | | |
611 | 611 | | |
612 | 612 | | |
613 | | - | |
| 613 | + | |
614 | 614 | | |
615 | | - | |
| 615 | + | |
616 | 616 | | |
617 | 617 | | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
618 | 629 | | |
619 | 630 | | |
620 | 631 | | |
621 | 632 | | |
622 | | - | |
| 633 | + | |
623 | 634 | | |
624 | 635 | | |
625 | 636 | | |
626 | 637 | | |
627 | | - | |
| 638 | + | |
628 | 639 | | |
629 | 640 | | |
630 | 641 | | |
| |||
968 | 979 | | |
969 | 980 | | |
970 | 981 | | |
971 | | - | |
972 | | - | |
| 982 | + | |
| 983 | + | |
973 | 984 | | |
974 | | - | |
975 | | - | |
976 | | - | |
977 | | - | |
| 985 | + | |
978 | 986 | | |
979 | 987 | | |
980 | 988 | | |
| |||
1012 | 1020 | | |
1013 | 1021 | | |
1014 | 1022 | | |
1015 | | - | |
| 1023 | + | |
1016 | 1024 | | |
1017 | 1025 | | |
1018 | 1026 | | |
| |||
1044 | 1052 | | |
1045 | 1053 | | |
1046 | 1054 | | |
1047 | | - | |
| 1055 | + | |
1048 | 1056 | | |
1049 | 1057 | | |
1050 | 1058 | | |
| |||
0 commit comments