mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-14 04:29:04 +03:00
Changes correctly update cursor position when there are folds
This commit is contained in:
parent
0bc510ab58
commit
8e107359f3
@ -745,3 +745,9 @@ describe "Editor", ->
|
||||
|
||||
editor.setCursorScreenPosition([9, 2])
|
||||
expect(editor.getCursorScreenPosition()).toEqual [9, 2]
|
||||
|
||||
buffer.insert([9, 4], 'x')
|
||||
expect(editor.getCursorScreenPosition()).toEqual [6, 5]
|
||||
expect(editor.getCursorBufferPosition()).toEqual [9, 5]
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ class Cursor extends View
|
||||
@one 'attach', => @updateAppearance()
|
||||
|
||||
bufferChanged: (e) ->
|
||||
@setScreenPosition(e.newRange.end)
|
||||
@setBufferPosition(e.newRange.end)
|
||||
|
||||
setScreenPosition: (position) ->
|
||||
position = Point.fromObject(position)
|
||||
|
Loading…
Reference in New Issue
Block a user