Skip to content

Commit 411ee7c

Browse files
committed
Merge branch 'master' of https://github.com/adobe/brackets into fold-selected
2 parents 75b3ace + 7beb2cd commit 411ee7c

11 files changed

Lines changed: 109 additions & 76 deletions

File tree

samples/pt-br/Primeiros Passos/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ <h2>Envolva-se</h2>
8585
<li><a href="http://github.com/adobe/brackets">Brackets no GitHub</a></li>
8686
<li><a href="http://github.com/adobe/brackets/wiki">Brackets Wiki</a></li>
8787
<li><a href="http://groups.google.com/group/brackets-dev">Mailing List Desenvolvedores Brackets</a></li>
88-
<li><a href="https://twitter.com/#!/brackets">@Brackets no Twitter</a></li>
88+
<li><a href="https://twitter.com/brackets">@Brackets no Twitter</a></li>
8989
<li>Fale com os desenvolvedores no canal IRC #brackets no Freenode</li>
9090
</ul>
9191

@@ -112,4 +112,4 @@ <h2>Envolva-se</h2>
112112
[:::::::::::::: ::::::::::::::]
113113
[[[[[[[[[[[[[[[ ]]]]]]]]]]]]]]]
114114
115-
-->
115+
-->

src/command/KeyBindingManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,13 +406,13 @@ define(function (require, exports, module) {
406406
// Ensure that the first letter of the key name is in upper case and the rest are
407407
// in lower case. i.e. 'a' => 'A' and 'up' => 'Up'
408408
if (/^[a-z]/i.test(key)) {
409-
key = key.charAt(0).toUpperCase() + key.substr(1).toLowerCase();
409+
key = _.capitalize(key.toLowerCase());
410410
}
411411

412412
// Also make sure that the second word of PageUp/PageDown has the first letter in upper case.
413413
if (/^Page/.test(key)) {
414414
key = key.replace(/(up|down)$/, function (match, p1) {
415-
return p1.charAt(0).toUpperCase() + p1.substr(1);
415+
return _.capitalize(p1);
416416
});
417417
}
418418

src/command/Menus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ define(function (require, exports, module) {
957957
menu = getMenu(id);
958958

959959
_.forEach(menuItemMap, function (value, key) {
960-
if (key.substring(0, id.length) === id) {
960+
if (_.startsWith(key, id)) {
961961
if (value.isDivider) {
962962
menu.removeMenuDivider(key);
963963
} else {

src/extensions/default/JavaScriptCodeHints/main.js

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,16 +219,7 @@ define(function (require, exports, module) {
219219
}
220220

221221
// trim leading and trailing string literal delimiters from the query
222-
if (query.indexOf(HintUtils.SINGLE_QUOTE) === 0 ||
223-
query.indexOf(HintUtils.DOUBLE_QUOTE) === 0) {
224-
trimmedQuery = query.substring(1);
225-
if (trimmedQuery.lastIndexOf(HintUtils.DOUBLE_QUOTE) === trimmedQuery.length - 1 ||
226-
trimmedQuery.lastIndexOf(HintUtils.SINGLE_QUOTE) === trimmedQuery.length - 1) {
227-
trimmedQuery = trimmedQuery.substring(0, trimmedQuery.length - 1);
228-
}
229-
} else {
230-
trimmedQuery = query;
231-
}
222+
trimmedQuery = _.trim(query, HintUtils.SINGLE_QUOTE + HintUtils.DOUBLE_QUOTE);
232223

233224
if (hints) {
234225
formattedHints = formatHints(hints, trimmedQuery);

src/language/CodeInspection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ define(function (require, exports, module) {
422422
(error.pos.line + 1) > 0 &&
423423
(error.codeSnippet = currentDoc.getLine(error.pos.line)) !== undefined) {
424424
error.friendlyLine = error.pos.line + 1;
425-
error.codeSnippet = error.codeSnippet.substr(0, Math.min(175, error.codeSnippet.length)); // limit snippet width
425+
error.codeSnippet = error.codeSnippet.substr(0, 175); // limit snippet width
426426
}
427427

428428
if (error.type !== Type.META) {

src/nls/es/strings.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,8 @@ define({
403403
"CMD_CSS_QUICK_EDIT_NEW_RULE" : "Nueva regla",
404404
"CMD_NEXT_DOC" : "Documento siguiente",
405405
"CMD_PREV_DOC" : "Documento anterior",
406-
"CMD_NEXT_DOC_LIST_ORDER" : "Document siguiente en la lista",
407-
"CMD_PREV_DOC_LIST_ORDER" : "Document anterior en la lista",
406+
"CMD_NEXT_DOC_LIST_ORDER" : "Documento siguiente en la lista",
407+
"CMD_PREV_DOC_LIST_ORDER" : "Documento anterior en la lista",
408408
"CMD_SHOW_IN_TREE" : "Mostrar en el árbol de directorios",
409409
"CMD_SHOW_IN_EXPLORER" : "Mostrar en el Explorador",
410410
"CMD_SHOW_IN_FINDER" : "Mostrar en Finder",

src/preferences/PreferencesBase.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1140,7 +1140,7 @@ define(function (require, exports, module) {
11401140
prefix = this.prefix;
11411141

11421142
var onlyWithPrefix = function (id) {
1143-
if (id.substr(0, prefix.length) === prefix) {
1143+
if (_.startsWith(id, prefix)) {
11441144
return true;
11451145
}
11461146
return false;

src/preferences/PreferencesManager.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,9 +407,9 @@ define(function (require, exports, module) {
407407
if (before === -1) {
408408
before = scopeOrder.length - 2;
409409
}
410-
newScopeOrder = _.first(scopeOrder, before);
410+
newScopeOrder = _.take(scopeOrder, before);
411411
newScopeOrder.push("project");
412-
newScopeOrder.push.apply(newScopeOrder, _.rest(scopeOrder, before));
412+
newScopeOrder.push.apply(newScopeOrder, _.drop(scopeOrder, before));
413413
} else {
414414
newScopeOrder = _.without(scopeOrder, "project");
415415
}

src/project/FileTreeView.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ define(function (require, exports, module) {
469469
var aArgs = _.flatten([{
470470
href: "#",
471471
className: fileClasses
472-
}, this.getIcons(), name, extension], true);
472+
}, this.getIcons(), name, extension]);
473473
nameDisplay = DOM.a.apply(DOM.a, aArgs);
474474
}
475475

@@ -702,7 +702,7 @@ define(function (require, exports, module) {
702702
var aArgs = _.flatten([{
703703
href: "#",
704704
className: directoryClasses
705-
}, this.getIcons()], true);
705+
}, this.getIcons()]);
706706
if (!entry.get("rename")) {
707707
aArgs.push(this.props.name);
708708
}

src/search/FindInFiles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ define(function (require, exports, module) {
138138

139139
if (highlightEndCh <= MAX_DISPLAY_LENGTH) {
140140
// Don't store more than 200 chars per line
141-
line = line.substr(0, Math.min(MAX_DISPLAY_LENGTH, line.length));
141+
line = line.substr(0, MAX_DISPLAY_LENGTH);
142142
} else if (totalMatchLength > MAX_DISPLAY_LENGTH) {
143143
// impossible to display the whole match
144144
line = line.substr(ch, ch + MAX_DISPLAY_LENGTH);

0 commit comments

Comments
 (0)