mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
SoftWrap state is stored in EditSessions, but it is set and toggled via Editor.
This commit is contained in:
@@ -24,11 +24,12 @@ class EditSession
|
||||
selections: null
|
||||
autoIndent: true
|
||||
softTabs: true
|
||||
softWrap: false
|
||||
|
||||
constructor: ({@buffer, @tabText, @autoIndent, @softTabs, @softWrapColumn}) ->
|
||||
constructor: ({@buffer, @tabText, @autoIndent, @softTabs, @softWrap}) ->
|
||||
@id = @constructor.idCounter++
|
||||
@softTabs ?= true
|
||||
@displayBuffer = new DisplayBuffer(@buffer, { @softWrapColumn, @tabText })
|
||||
@displayBuffer = new DisplayBuffer(@buffer, { @tabText })
|
||||
@tokenizedBuffer = @displayBuffer.tokenizedBuffer
|
||||
@cursors = []
|
||||
@selections = []
|
||||
@@ -70,6 +71,9 @@ class EditSession
|
||||
setAutoIndent: (@autoIndent) ->
|
||||
setSoftTabs: (@softTabs) ->
|
||||
|
||||
getSoftWrap: -> @softWrap
|
||||
setSoftWrap: (@softWrap) ->
|
||||
|
||||
clipBufferPosition: (bufferPosition, options) ->
|
||||
{ row, column } = Point.fromObject(bufferPosition)
|
||||
row = 0 if row < 0
|
||||
|
||||
Reference in New Issue
Block a user