mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 10:17:11 +03:00
Supply missing softWrapHangingIndent parameter to display layer
This commit is contained in:
parent
c7b7eace22
commit
43f34f73da
@ -6036,6 +6036,17 @@ describe "TextEditor", ->
|
||||
editor.setEditorWidthInChars(10)
|
||||
expect(editor.lineTextForScreenRow(0)).toBe 'var '
|
||||
|
||||
describe "the softWrapHangingIndent setting", ->
|
||||
it "controls how much extra indentation is applied to soft-wrapped lines", ->
|
||||
editor.setText('123456789')
|
||||
editor.setEditorWidthInChars(8)
|
||||
atom.config.set('editor.softWrap', true)
|
||||
atom.config.set('editor.softWrapHangingIndent', 2)
|
||||
expect(editor.lineTextForScreenRow(1)).toEqual ' 9'
|
||||
|
||||
atom.config.set('editor.softWrapHangingIndent', 4)
|
||||
expect(editor.lineTextForScreenRow(1)).toEqual ' 9'
|
||||
|
||||
describe "::getElement", ->
|
||||
it "returns an element", ->
|
||||
expect(editor.getElement() instanceof HTMLElement).toBe(true)
|
||||
|
@ -265,7 +265,8 @@ class TextEditor extends Model
|
||||
tabLength: @getTabLength(),
|
||||
ratioForCharacter: @ratioForCharacter.bind(this),
|
||||
isWrapBoundary: isWrapBoundary,
|
||||
foldCharacter: ZERO_WIDTH_NBSP
|
||||
foldCharacter: ZERO_WIDTH_NBSP,
|
||||
softWrapHangingIndent: @config.get('editor.softWrapHangingIndent', scope: @getRootScopeDescriptor())
|
||||
})
|
||||
|
||||
destroyed: ->
|
||||
|
Loading…
Reference in New Issue
Block a user