Fix text transformation bug

This fixes the remaining text transformation tests.

Ref #1526
This commit is contained in:
Zachary Yedidia
2020-02-24 20:11:11 -05:00
parent 8848388411
commit 70bcf9f618
2 changed files with 1 additions and 7 deletions

View File

@@ -180,7 +180,7 @@ func (eh *EventHandler) Remove(start, end Loc) {
for _, c := range eh.cursors {
move := func(loc Loc) Loc {
if start.Y != end.Y && loc.GreaterThan(end) {
if loc.Y != end.Y && loc.GreaterThan(end) {
loc.Y -= end.Y - start.Y
} else if loc.Y == end.Y && loc.GreaterEqual(end) {
loc = loc.MoveLA(-DiffLA(start, end, eh.buf.LineArray), eh.buf.LineArray)