fix #1407 Emmet breaks blockindent
This commit is contained in:
parent
01224f9509
commit
563a38700d
1 changed files with 9 additions and 3 deletions
|
|
@ -318,10 +318,15 @@ function runEmmetCommand(editor) {
|
||||||
editorProxy.setupContext(editor);
|
editorProxy.setupContext(editor);
|
||||||
if (editorProxy.getSyntax() == "php")
|
if (editorProxy.getSyntax() == "php")
|
||||||
return false;
|
return false;
|
||||||
var actions = emmet.require("actions")
|
var actions = emmet.require("actions");
|
||||||
|
|
||||||
|
if (this.action == "expand_abbreviation_with_tab") {
|
||||||
|
if (!editor.selection.isEmpty())
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
var result = actions.run(this.name, editorProxy);
|
var result = actions.run(this.action, editorProxy);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
editor._signal("changeStatus", typeof e == "string" ? e : e.message);
|
editor._signal("changeStatus", typeof e == "string" ? e : e.message);
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|
@ -331,7 +336,8 @@ function runEmmetCommand(editor) {
|
||||||
|
|
||||||
for (var command in keymap) {
|
for (var command in keymap) {
|
||||||
exports.commands.addCommand({
|
exports.commands.addCommand({
|
||||||
name: command,
|
name: "emmet:" + command,
|
||||||
|
action: command,
|
||||||
bindKey: keymap[command],
|
bindKey: keymap[command],
|
||||||
exec: runEmmetCommand
|
exec: runEmmetCommand
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue