mirror of
https://github.com/atom/atom.git
synced 2026-02-17 10:01:25 -05:00
If command panel selects text within a fold, the fold is destroyed
This commit is contained in:
@@ -232,4 +232,16 @@ describe "CommandInterpreter", ->
|
||||
|
||||
interpreter.eval(editor, 's/current/foo/g')
|
||||
expect(buffer.lineForRow(5)).toBe ' foo = items.shift();'
|
||||
expect(buffer.lineForRow(6)).toBe ' foo < pivot ? left.push(foo) : right.push(current);'
|
||||
expect(buffer.lineForRow(6)).toBe ' foo < pivot ? left.push(foo) : right.push(current);'
|
||||
|
||||
describe "when command selects folded text", ->
|
||||
it "unfolds lines that command selects", ->
|
||||
editor.createFold(1, 9)
|
||||
editor.createFold(5, 8)
|
||||
editor.setSelectedBufferRange([[0,0], [0,0]])
|
||||
|
||||
interpreter.eval(editor, '/push/')
|
||||
expect(editor.getSelection().getBufferRange()).toEqual [[6,29], [6,33]]
|
||||
expect(editor.lineForScreenRow(1).fold).toBeUndefined()
|
||||
expect(editor.lineForScreenRow(5).fold).toBeUndefined()
|
||||
expect(editor.lineForScreenRow(6).text).toBe buffer.lineForRow(6)
|
||||
|
||||
Reference in New Issue
Block a user