mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Update editor lines & cursors to not use bootstrap-styled pre element
This commit is contained in:
@@ -6,7 +6,7 @@ _ = require 'underscore'
|
||||
module.exports =
|
||||
class CursorView extends View
|
||||
@content: ->
|
||||
@pre class: 'cursor idle', => @raw ' '
|
||||
@div class: 'cursor idle', => @raw ' '
|
||||
|
||||
blinkPeriod: 800
|
||||
editor: null
|
||||
|
||||
@@ -726,7 +726,7 @@ class Editor extends View
|
||||
@overlayer.append(view)
|
||||
|
||||
calculateDimensions: ->
|
||||
fragment = $('<pre class="line" style="position: absolute; visibility: hidden;"><span>x</span></div>')
|
||||
fragment = $('<div class="line" style="position: absolute; visibility: hidden;"><span>x</span></div>')
|
||||
@renderedLines.append(fragment)
|
||||
|
||||
lineRect = fragment[0].getBoundingClientRect()
|
||||
@@ -1052,7 +1052,7 @@ class Editor extends View
|
||||
|
||||
attributePairs = []
|
||||
attributePairs.push "#{attributeName}=\"#{value}\"" for attributeName, value of lineAttributes
|
||||
line.push("<pre #{attributePairs.join(' ')}>")
|
||||
line.push("<div #{attributePairs.join(' ')}>")
|
||||
|
||||
invisibles = @invisibles if @showInvisibles
|
||||
|
||||
@@ -1081,7 +1081,7 @@ class Editor extends View
|
||||
|
||||
line.push("<span class='fold-marker'/>") if fold
|
||||
|
||||
line.push('</pre>')
|
||||
line.push('</div>')
|
||||
line.join('')
|
||||
|
||||
lineElementForScreenRow: (screenRow) ->
|
||||
|
||||
@@ -139,6 +139,10 @@
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.editor .line {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.editor .line span {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user