mirror of
https://github.com/atom/atom.git
synced 2026-02-12 07:35:14 -05:00
Move handling of undoGroupingInterval to TextEditorRegistry
This commit is contained in:
@@ -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
|
||||
###
|
||||
|
||||
Reference in New Issue
Block a user