     @calculateDimensions()
     @hiddenInput.width(@charWidth)
     @setSoftWrapColumn() if @activeEditSession.getSoftWrap()
-    $(window).on "resize.editor#{@id}", => @requestDisplayUpdate()
+    @subscribe $(window), "resize", => @requestDisplayUpdate()
     @focus() if @isFocused
 
     @resetDisplay()


    @destroyEditSessions()

    $(window).off ".editor#{@id}"
    rootView = @rootView()
    rootView?.off ".editor#{@id}"
    if @pane() then @pane().remove() else super
    rootView?.focus()


  initialize: ({editSession, @mini} = {}) ->
    requireStylesheet 'editor.css'

    @lineCache = []
    @configure()
    @bindKeys()
