Skip to content

Commit

Permalink
Editor: Support rename-tag in languages that can contain HTML (eg. php)
Browse files Browse the repository at this point in the history
rn=

(integrated from master branch change 9.2.1-419-gdf0ab16 by Nathan Rijksen <n.rijksen@gmail.com>)
  • Loading branch information
Naatan committed Oct 2, 2015
1 parent 9cd5b67 commit 7245cc2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/chrome/komodo/content/editor.js
Expand Up @@ -584,7 +584,9 @@ editor_editorController.prototype._aux_is_cmd_rename_tag_enabled = function() {
if (!koDoc) {
return [false];
}
if (koDoc.languageObj.supportsSmartIndent != "XML") {
var scimoz = view.scimoz;
var languageObj = koDoc.languageObj.supportsXMLIndentHere(scimoz, scimoz.currentPos);
if (languageObj.supportsSmartIndent != "XML") {
return [false];
}
return [true, view, koDoc];
Expand Down Expand Up @@ -673,7 +675,8 @@ editor_editorController.prototype.do_cmd_rename_tag = function() {
}
var tagName = scimoz.getTextRange(tagNameStartPos, tagNameEndPos);
var result = {};
koDoc.languageObj.getMatchingTagInfo(scimoz, tagNameStartPos - 1, false, result, {});
var actualLanguageObj = koDoc.languageObj.supportsXMLIndentHere(scimoz, scimoz.currentPos);
actualLanguageObj.getMatchingTagInfo(scimoz, tagNameStartPos - 1, false, result, {});
if (!result.value || !result.value.length) {
var msg = _bundle.formatStringFromName("RenameTag Failed to find a matching tag for X",
[tagName], 1);
Expand Down

0 comments on commit 7245cc2

Please sign in to comment.