mirror of
https://github.com/atom/atom.git
synced 2026-02-11 07:05:11 -05:00
Add tests for highlight rendering
This commit is contained in:
committed by
Antonio Scandurra
parent
003f6ff231
commit
c80dbbce3c
@@ -253,7 +253,7 @@ class TextEditorComponent {
|
||||
)
|
||||
}
|
||||
|
||||
return $.div({style}, children)
|
||||
return $.div({ref: 'content', style}, children)
|
||||
}
|
||||
|
||||
renderLineTiles (width, height) {
|
||||
@@ -1509,17 +1509,19 @@ class HighlightComponent {
|
||||
}))
|
||||
}
|
||||
|
||||
children.push($.div({
|
||||
className: 'region',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
boxSizing: 'border-box',
|
||||
top: endPixelTop - lineHeight + 'px',
|
||||
left: 0,
|
||||
width: endPixelLeft + 'px',
|
||||
height: lineHeight + 'px'
|
||||
}
|
||||
}))
|
||||
if (endPixelLeft > 0) {
|
||||
children.push($.div({
|
||||
className: 'region',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
boxSizing: 'border-box',
|
||||
top: endPixelTop - lineHeight + 'px',
|
||||
left: 0,
|
||||
width: endPixelLeft + 'px',
|
||||
height: lineHeight + 'px'
|
||||
}
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
||||
const className = 'highlight ' + decoration.class
|
||||
|
||||
Reference in New Issue
Block a user