code: function _onActiveEditorChange(event, current, previous) {
          if (previous) {
              previous.off(".statusbar");
              previous.document.off(".statusbar");
              previous.document.releaseRef();
          }
  
          if (!current) {
              StatusBar.hideAllPanes();
          } else {
              var fullPath = current.document.file.fullPath;
              StatusBar.showAllPanes();
  
              current.on("cursorActivity.statusbar", _updateCursorInfo);
              current.on("optionChange.statusbar", function () {
                  _updateIndentType(fullPath);
                  _updateIndentSize(fullPath);
              });
              current.on("change.statusbar", function () {
                  // async update to keep typing speed smooth
                  window.setTimeout(function () { _updateFileInfo(current); }, 0);
              });
              current.on("overwriteToggle.statusbar", _updateOverwriteLabel);
  
              current.document.addRef();
              current.document.on("languageChanged.statusbar", function () {
                  _updateLanguageInfo(current);
              });
  
              _updateCursorInfo(null, current);
              _updateLanguageInfo(current);
              _updateEncodingInfo(current);
              _updateFileInfo(current);
              _initOverwriteMode(current);
              _updateIndentType(fullPath);
              _updateIndentSize(fullPath);
          }
      }
docs: Handle active editor change event
  @param {Event} event (unused)
  @param {Editor} current Current editor
  @param {Editor} previous Previous editor