diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-07-14 16:16:43 +0900 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-07-14 16:16:43 +0900 |
| commit | 6e40e57ed468a535d6a1a5b4dad6a9da50dc8276 (patch) | |
| tree | b76268223acb2a48241a0660bfc181ca25ce2800 /src/selection.cc | |
| parent | 580eae03881190b108ffb896197af27d88935177 (diff) | |
Fix replacing reducing selections to their cursor
Broken by 8650c99f131aae8b10eb2141f7c2152fff25b7d1
Diffstat (limited to 'src/selection.cc')
| -rw-r--r-- | src/selection.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/selection.cc b/src/selection.cc index 1c39c8a7..5c8f2707 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -379,8 +379,8 @@ static void fix_overflowing_selections(Vector<Selection>& selections, const BufferCoord back_coord = buffer.back_coord(); for (auto& sel : selections) { - auto pos = buffer.clamp(sel.cursor()); - sel.anchor() = sel.cursor() = std::min(pos, back_coord); + sel.cursor() = std::min(buffer.clamp(sel.cursor()), back_coord); + sel.anchor() = std::min(buffer.clamp(sel.anchor()), back_coord); } } |
