Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Merge pull request #602 from adobe/pflynn/issue-533
Browse files Browse the repository at this point in the history
Fix #533 (gutter width syncing no longer working, impacting inline editor H scrolling in certain cases)
  • Loading branch information
njx committed Apr 7, 2012
2 parents c7af3af + bb15828 commit e2590ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
6 changes: 3 additions & 3 deletions src/editor/EditorManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ define(function (require, exports, module) {

/**
* @private
* Given a host editor, return a list of all its open inline Editors. (Ignoring any other
* inline widgets that might be open).
* Given a host editor, return a list of all Editors in all its open inline widgets. (Ignoring
* any other inline widgets that might be open but don't contain Editors).
* @param {!Editor} hostEditor
* @return {Array.<Editor>}
*
Expand All @@ -194,7 +194,7 @@ define(function (require, exports, module) {
var inlineEditors = [];
hostEditor.getInlineWidgets().forEach(function (widget) {
if (widget instanceof InlineTextEditor) {
inlineEditors.concat(widget.editors);
inlineEditors = inlineEditors.concat(widget.editors);
}
});
return inlineEditors;
Expand Down
12 changes: 2 additions & 10 deletions src/editor/InlineTextEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,9 @@ define(function (require, exports, module) {
* @private
*/
function _syncGutterWidths(hostEditor) {
var inlines = EditorManager.getInlineEditors(hostEditor),
allHostedEditors = [];
var allHostedEditors = EditorManager.getInlineEditors(hostEditor);

// add all Editor instances of each InlineTextEditor
inlines.forEach(function (inline) {
if (inline instanceof InlineTextEditor) {
Array.push.apply(allHostedEditors, inline.editors);
}
});

// add the host to the list and go through them all
// add the host itself to the list too
allHostedEditors.push(hostEditor);

var maxWidth = 0;
Expand Down

0 comments on commit e2590ee

Please sign in to comment.