Handle changes to the tabLength setting

This commit is contained in:
Ben Ogle
2014-10-03 16:22:16 -07:00
parent 339cb02269
commit 8cd217e50a
3 changed files with 25 additions and 6 deletions

View File

@@ -485,10 +485,9 @@ class TextEditor extends Model
# Create an {TextEditor} with its initial state based on this object
copy: ->
tabLength = @getTabLength()
displayBuffer = @displayBuffer.copy()
softTabs = @getSoftTabs()
newEditor = new TextEditor({@buffer, displayBuffer, tabLength, softTabs, suppressCursorCreation: true, registerEditor: true})
newEditor = new TextEditor({@buffer, displayBuffer, @tabLength, softTabs, suppressCursorCreation: true, registerEditor: true})
for marker in @findMarkers(editorId: @id)
marker.copy(editorId: newEditor.id, preserveFolds: true)
newEditor