mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-11-10 18:24:09 +03:00
Merge pull request #5786 from atom/iz-no-foldable-icon-on-soft-wrapped-lines
Don't show foldable icon on soft wrapped lines
This commit is contained in:
commit
e57d1f17a1
@ -637,6 +637,18 @@ describe "TextEditorComponent", ->
|
||||
nextAnimationFrame()
|
||||
expect(lineNumberHasClass(5, 'folded')).toBe false
|
||||
|
||||
describe "when soft wrapping is enabled", ->
|
||||
beforeEach ->
|
||||
editor.setSoftWrapped(true)
|
||||
nextAnimationFrame()
|
||||
componentNode.style.width = 16 * charWidth + editor.getVerticalScrollbarWidth() + 'px'
|
||||
component.measureHeightAndWidth()
|
||||
nextAnimationFrame()
|
||||
|
||||
it "doesn't add the foldable class for soft-wrapped lines", ->
|
||||
expect(lineNumberHasClass(0, 'foldable')).toBe true
|
||||
expect(lineNumberHasClass(1, 'foldable')).toBe false
|
||||
|
||||
describe "mouse interactions with fold indicators", ->
|
||||
[gutterNode] = []
|
||||
|
||||
|
@ -124,10 +124,10 @@ class GutterComponent
|
||||
oldLineNumberState.top = newLineNumberState.top
|
||||
oldLineNumberState.screenRow = newLineNumberState.screenRow
|
||||
|
||||
buildLineNumberClassName: ({bufferRow, foldable, decorationClasses}) ->
|
||||
buildLineNumberClassName: ({bufferRow, foldable, decorationClasses, softWrapped}) ->
|
||||
className = "line-number line-number-#{bufferRow}"
|
||||
className += " " + decorationClasses.join(' ') if decorationClasses?
|
||||
className += " foldable" if foldable
|
||||
className += " foldable" if foldable and not softWrapped
|
||||
className
|
||||
|
||||
lineNumberNodeForScreenRow: (screenRow) ->
|
||||
|
Loading…
Reference in New Issue
Block a user