mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-12-28 17:13:45 +03:00
Update remaining selected class names to fold-selected
This commit is contained in:
parent
383a724144
commit
9f5e913804
@ -2110,23 +2110,23 @@ describe "Editor", ->
|
||||
expect(editor.getCursorBufferPosition()).toEqual [3, 0]
|
||||
|
||||
describe "when a selection starts/stops intersecting a fold", ->
|
||||
it "adds/removes the 'selected' class to the fold's line element and hides the cursor if it is on the fold line", ->
|
||||
it "adds/removes the 'fold-selected' class to the fold's line element and hides the cursor if it is on the fold line", ->
|
||||
editor.createFold(2, 4)
|
||||
|
||||
editor.setSelectedBufferRange([[1, 0], [2, 0]], preserveFolds: true, isReversed: true)
|
||||
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.selected')
|
||||
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.fold-selected')
|
||||
|
||||
editor.setSelectedBufferRange([[1, 0], [1, 1]], preserveFolds: true)
|
||||
expect(editor.lineElementForScreenRow(2)).not.toMatchSelector('.fold.selected')
|
||||
expect(editor.lineElementForScreenRow(2)).not.toMatchSelector('.fold.fold-selected')
|
||||
|
||||
editor.setSelectedBufferRange([[1, 0], [5, 0]], preserveFolds: true)
|
||||
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.selected')
|
||||
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.fold-selected')
|
||||
|
||||
editor.setCursorScreenPosition([3,0])
|
||||
expect(editor.lineElementForScreenRow(2)).not.toMatchSelector('.fold.selected')
|
||||
expect(editor.lineElementForScreenRow(2)).not.toMatchSelector('.fold.fold-selected')
|
||||
|
||||
editor.setCursorScreenPosition([2,0])
|
||||
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.selected')
|
||||
expect(editor.lineElementForScreenRow(2)).toMatchSelector('.fold.fold-selected')
|
||||
expect(editor.find('.cursor')).toBeHidden()
|
||||
|
||||
editor.setCursorScreenPosition([3,0])
|
||||
|
Loading…
Reference in New Issue
Block a user