Don't respond to observe events when the editor value doesn't change

This commit is contained in:
probablycorey
2013-04-26 10:08:16 -07:00
committed by Corey Johnson & Kevin Sawicki
parent 9f85ba4f7d
commit f06c9a5bc8

View File

@@ -37,6 +37,8 @@ class ConfigPanel extends View
type = editor.attr('type')
@observeConfig name, (value) ->
return if value?.toString() == editor.getText()
value ?= ""
editor.setText(value.toString())
editor.getBuffer().on 'contents-modified', ->