mirror of
https://github.com/atom/atom.git
synced 2026-02-08 21:55:05 -05:00
Save state on mousedown or keypress events (debounce 1s). Tests WIP
This commit is contained in:
@@ -119,6 +119,9 @@ class AtomEnvironment extends Model
|
||||
constructor: (params={}) ->
|
||||
{@blobStore, @applicationDelegate, @window, @document, configDirPath, @enablePersistence, onlyLoadBaseStyleSheets} = params
|
||||
|
||||
@document.addEventListener('mousedown', _.debounce(@saveStateSync.bind(this), 1000), true)
|
||||
@document.addEventListener('keypress', _.debounce(@saveStateSync.bind(this), 1000), true)
|
||||
|
||||
@state = {version: @constructor.version}
|
||||
|
||||
@loadTime = null
|
||||
|
||||
Reference in New Issue
Block a user