diff --git a/src/app/cursor-view.coffee b/src/app/cursor-view.coffee
index 03fae93de..a2bead1f8 100644
--- a/src/app/cursor-view.coffee
+++ b/src/app/cursor-view.coffee
@@ -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
diff --git a/src/app/editor.coffee b/src/app/editor.coffee
index 9645585d7..868b3ce61 100644
--- a/src/app/editor.coffee
+++ b/src/app/editor.coffee
@@ -726,7 +726,7 @@ class Editor extends View
@overlayer.append(view)
calculateDimensions: ->
- fragment = $('
x')
+ fragment = $('x
')
@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("")
+ line.push("")
invisibles = @invisibles if @showInvisibles
@@ -1081,7 +1081,7 @@ class Editor extends View
line.push("") if fold
- line.push('')
+ line.push('
')
line.join('')
lineElementForScreenRow: (screenRow) ->
diff --git a/static/editor.less b/static/editor.less
index 4ac5cb832..e2d66e56e 100644
--- a/static/editor.less
+++ b/static/editor.less
@@ -139,6 +139,10 @@
position: absolute;
}
+.editor .line {
+ white-space: pre;
+}
+
.editor .line span {
vertical-align: top;
}