mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-20 15:37:46 +03:00
Use a zero-width nbsp as our fold character
This commit is contained in:
parent
a083a754a5
commit
e6cfb8d587
@ -5352,7 +5352,7 @@ describe "TextEditor", ->
|
||||
# folds are also duplicated
|
||||
expect(editor.isFoldedAtScreenRow(5)).toBe(true)
|
||||
expect(editor.isFoldedAtScreenRow(7)).toBe(true)
|
||||
expect(editor.lineTextForScreenRow(7)).toBe " while(items.length > 0) {⋯"
|
||||
expect(editor.lineTextForScreenRow(7)).toBe " while(items.length > 0) {" + editor.displayLayer.foldCharacter
|
||||
expect(editor.lineTextForScreenRow(8)).toBe " return sort(left).concat(pivot).concat(sort(right));"
|
||||
|
||||
it "duplicates all folded lines for empty selections on folded lines", ->
|
||||
|
@ -9,6 +9,8 @@ Decoration = require './decoration'
|
||||
LayerDecoration = require './layer-decoration'
|
||||
{isDoubleWidthCharacter, isHalfWidthCharacter, isKoreanCharacter, isWrapBoundary} = require './text-utils'
|
||||
|
||||
ZERO_WIDTH_NBSP = '\ufeff'
|
||||
|
||||
class BufferToScreenConversionError extends Error
|
||||
constructor: (@message, @metadata) ->
|
||||
super
|
||||
@ -123,8 +125,9 @@ class DisplayBuffer extends Model
|
||||
softWrapColumn: softWrapColumn
|
||||
showIndentGuides: @config.get('editor.showIndentGuide', scope: scopeDescriptor)
|
||||
tabLength: @getTabLength(),
|
||||
ratioForCharacter: @ratioForCharacter.bind(this)
|
||||
isWrapBoundary: isWrapBoundary
|
||||
ratioForCharacter: @ratioForCharacter.bind(this),
|
||||
isWrapBoundary: isWrapBoundary,
|
||||
foldCharacter: ZERO_WIDTH_NBSP
|
||||
})
|
||||
|
||||
updateAllScreenLines: ->
|
||||
|
Loading…
Reference in New Issue
Block a user