mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Clear the goal column when the cursor moves
Previously it was only cleared when changing the position explicitly and not as a result of the underlying marker changing such as during a text insertion. Closes #1295
This commit is contained in:
@@ -28,6 +28,7 @@ class Cursor
|
||||
return if oldHeadScreenPosition.isEqual(newHeadScreenPosition)
|
||||
|
||||
@needsAutoscroll ?= @isLastCursor() and !textChanged
|
||||
@goalColumn = null
|
||||
|
||||
movedEvent =
|
||||
oldBufferPosition: oldHeadBufferPosition
|
||||
@@ -50,7 +51,6 @@ class Cursor
|
||||
|
||||
# Private:
|
||||
changePosition: (options, fn) ->
|
||||
@goalColumn = null
|
||||
@clearSelection()
|
||||
@needsAutoscroll = options.autoscroll ? @isLastCursor()
|
||||
unless fn()
|
||||
|
||||
Reference in New Issue
Block a user