Lines remain syntax-highlighted when they are updated.

This commit is contained in:
Corey Johnson & Nathan Sobo
2012-02-02 17:04:37 -07:00
parent 71e5462611
commit 0120df540a
2 changed files with 7 additions and 6 deletions

View File

@@ -133,12 +133,7 @@ class Editor extends Template
@cursor.bufferChanged(e)
updateLineElement: (row) ->
line = @buffer.getLine(row)
element = @getLineElement(row)
if line == ''
element.html(' ')
else
element.text(line)
@getLineElement(row).replaceWith(@buildLineElement(row))
insertLineElement: (row) ->
@getLineElement(row).before(@buildLineElement(row))