mirror of
https://github.com/atom/atom.git
synced 2026-01-23 22:08:08 -05:00
Always render a non-breaking space at the end of screen lines
This ensures that if the line only contains a placeholder that it still has a single character to keep the line div at a consistent height with other lines.
This commit is contained in:
@@ -138,15 +138,13 @@ class Editor extends View
|
||||
charHeight = @charHeight
|
||||
$$ ->
|
||||
@div class: 'line', =>
|
||||
if tokens.length
|
||||
for token in tokens
|
||||
if token.type is 'fold-placeholder'
|
||||
@span ' ', class: 'fold-placeholder', style: "width: #{3 * charWidth}px; height: #{charHeight * .85 }px;", 'foldId': token.fold.id, =>
|
||||
@div class: "ellipsis", => @raw "…"
|
||||
else
|
||||
@span { class: token.type.replace('.', ' ') }, token.value
|
||||
else
|
||||
@raw ' '
|
||||
for token in tokens
|
||||
if token.type is 'fold-placeholder'
|
||||
@span ' ', class: 'fold-placeholder', style: "width: #{3 * charWidth}px; height: #{charHeight}px;", 'foldId': token.fold.id, =>
|
||||
@div class: "ellipsis", => @raw "…"
|
||||
else
|
||||
@span { class: token.type.replace('.', ' ') }, token.value
|
||||
@raw ' '
|
||||
|
||||
renderLines: ->
|
||||
@lines.find('.line').remove()
|
||||
|
||||
Reference in New Issue
Block a user