File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,16 @@ void Selection::_RegenerateSelectionSpans() const
55
55
const auto blockSelection = !IsLineSelection ();
56
56
const auto & buffer = screenInfo.GetTextBuffer ();
57
57
auto startSelectionAnchor = _d->coordSelectionAnchor ;
58
- buffer.GetSize ().IncrementInExclusiveBounds (startSelectionAnchor <= endSelectionAnchor ? endSelectionAnchor : startSelectionAnchor);
58
+ if (blockSelection)
59
+ {
60
+ // Compare x-values when we're in block selection!
61
+ buffer.GetSize ().IncrementInExclusiveBounds (startSelectionAnchor.x <= endSelectionAnchor.x ? endSelectionAnchor : startSelectionAnchor);
62
+ }
63
+ else
64
+ {
65
+ // General comparison for line selection.
66
+ buffer.GetSize ().IncrementInExclusiveBounds (startSelectionAnchor <= endSelectionAnchor ? endSelectionAnchor : startSelectionAnchor);
67
+ }
59
68
_lastSelectionSpans = buffer.GetTextSpans (startSelectionAnchor,
60
69
endSelectionAnchor,
61
70
blockSelection,
You can’t perform that action at this time.
0 commit comments