Anchor.ignoreEqual works properly

The anchor ignores buffer changes when ignoreEqual is true and the oldRange.start == anchor.position
This commit is contained in:
Corey Johnson
2012-10-31 14:15:13 -07:00
parent 7793a04172
commit 84ea1017f4
2 changed files with 30 additions and 4 deletions

View File

@@ -25,10 +25,8 @@ class Anchor
@destroy()
return
if @ignoreEqual
return if position.isLessThanOrEqual(oldRange.end)
else
return if position.isLessThan(oldRange.end)
return if @ignoreEqual and position.isEqual(oldRange.start)
return if position.isLessThan(oldRange.end)
newRow = newRange.end.row
newColumn = newRange.end.column