mirror of
https://github.com/atom/atom.git
synced 2026-02-19 02:44:29 -05:00
Preserve buffer contents for unsaved files when reloading
This commit is contained in:
committed by
Nathan Sobo
parent
9a8fd062c4
commit
693d8258ad
@@ -2059,6 +2059,10 @@ describe "EditSession", ->
|
||||
editSession.setCursorScreenPosition([0, 1])
|
||||
editSession.buffer.reload()
|
||||
expect(editSession.getCursorScreenPosition()).toEqual [0,1]
|
||||
it "preserves the current state if the file was not saved yet", ->
|
||||
editSession = project.buildEditSessionFromState('test', autoIndent: false)
|
||||
editSession = EditSession.deserialize(editSession.serialize())
|
||||
expect(editSession.buffer.getText()).toBe('test')
|
||||
|
||||
describe "when the 'grammars-loaded' event is triggered on the syntax global", ->
|
||||
it "reloads the edit session's grammar and re-tokenizes the buffer if it changes", ->
|
||||
|
||||
Reference in New Issue
Block a user