mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Isolate folds on a per-display-buffer basis
Creating a fold in one pane now has no effect on an edit session for the same buffer in another pane. Before they were polluting each other by sharing the same fold markers.
This commit is contained in:
@@ -257,6 +257,12 @@ describe "DisplayBuffer", ->
|
||||
expect(line0.fold).toBe outerFold
|
||||
expect(line1.fold).toBeUndefined()
|
||||
|
||||
describe "when there is another display buffer pointing to the same buffer", ->
|
||||
it "does not create folds in the other display buffer", ->
|
||||
otherDisplayBuffer = new DisplayBuffer(buffer, { tabLength })
|
||||
displayBuffer.createFold(2, 4)
|
||||
expect(otherDisplayBuffer.foldsStartingAtBufferRow(2).length).toBe 0
|
||||
|
||||
describe "when the buffer changes", ->
|
||||
[fold1, fold2] = []
|
||||
beforeEach ->
|
||||
|
||||
Reference in New Issue
Block a user