Move handling of undoGroupingInterval to TextEditorRegistry

This commit is contained in:
Max Brunsfeld
2016-07-11 17:47:40 -07:00
parent 9ab474a673
commit 5167dbca6f
4 changed files with 19 additions and 2 deletions

View File

@@ -153,6 +153,7 @@ class TextEditor extends Model
@backUpBeforeSaving ?= false
@autoIndent ?= true
@autoIndentOnPaste ?= true
@undoGroupingInterval ?= 300
@buffer ?= new TextBuffer
@tokenizedBuffer ?= new TokenizedBuffer({
@@ -898,7 +899,7 @@ class TextEditor extends Model
return false unless @emitWillInsertTextEvent(text)
groupingInterval = if options.groupUndo
@config.get('editor.undoGroupingInterval')
@undoGroupingInterval
else
0
@@ -3339,6 +3340,10 @@ class TextEditor extends Model
getScrollPastEnd: -> @scrollPastEnd
setUndoGroupingInterval: (@undoGroupingInterval) ->
getUndoGroupingInterval: -> @undoGroupingInterval
###
Section: Event Handlers
###