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

Commit

Permalink
Merge remote-tracking branch 'origin/master' into tvoliter/issue-541
Browse files Browse the repository at this point in the history
  • Loading branch information
njx committed Apr 7, 2012
2 parents af0ee81 + e2590ee commit f6381ed
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 17 deletions.
6 changes: 4 additions & 2 deletions src/LiveDevelopment/LiveDevelopment.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ define(function LiveDevelopment(require, exports, module) {
*/
};

var _liveDocument; // the live HTML document
var _htmlDocumentPath; // the path of the html file open for live development
var _liveDocument; // the document open for live editing.
var _relatedDocuments; // CSS and JS documents that are used by the live HTML document

/** Augments the given Brackets document with information that's useful for live development. */
Expand Down Expand Up @@ -359,9 +360,10 @@ define(function LiveDevelopment(require, exports, module) {
_openDocument(doc, editor);
} else {
/* FUTURE: support live connections for docments other than html */
if (doc.extension && doc.extension.indexOf('htm') === 0) {
if (doc.extension && doc.extension.indexOf('htm') === 0 && doc.file.fullPath !== _htmlDocumentPath) {
close();
setTimeout(open);
_htmlDocumentPath = doc.file.fullPath;
}
}
} else if (exports.config.autoconnect) {
Expand Down
2 changes: 1 addition & 1 deletion src/editor/CSSInlineEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ define(function (require, exports, module) {
// if we're underneath the rule list on the right, we want to ask the host editor to
// scroll far enough that the current cursor position is visible to the left of the rule
// list. (Because we always add extra padding for the rule list, this is always possible.)
if (cursorCoords.x > ruleListOffset.left) {
if (cursorCoords.x >= ruleListOffset.left) {
cursorCoords.x += this.$relatedContainer.outerWidth();
}

Expand Down
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
2 changes: 1 addition & 1 deletion src/styles/brackets.less
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ a, img {
/*-webkit-transition: width 0.15s ease-out;*/
background: #f2f2f2;
border-left: 1px solid #ccc;
box-shadow: -1px 0 0 0 #fff;

@top-margin: 12px;

Expand All @@ -390,7 +391,6 @@ a, img {
position: absolute;
top: 0;
left: 1px;
box-shadow: -1px 0 0 0 #fff;
font-size: 12px;

ul {
Expand Down
4 changes: 4 additions & 0 deletions src/styles/brackets_codemirror_override.less
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: @accent-bracket;}
background: transparent;
border-right: none;
}

.CodeMirror-scroll {
outline: none;
}
}

0 comments on commit f6381ed

Please sign in to comment.