Merge pull request #845 from wcandillon/master
Disable buggy XQuery behavior (#844)
This commit is contained in:
commit
4c3ab0e3df
2 changed files with 33 additions and 33 deletions
|
|
@ -28,39 +28,39 @@ define(function(require, exports, module) {
|
||||||
this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
|
this.inherit(CstyleBehaviour, ["braces", "parens", "string_dquotes"]); // Get string behaviour
|
||||||
this.parent = parent;
|
this.parent = parent;
|
||||||
|
|
||||||
this.add("brackets", "insertion", function (state, action, editor, session, text) {
|
// this.add("brackets", "insertion", function (state, action, editor, session, text) {
|
||||||
if (text == "\n") {
|
// if (text == "\n") {
|
||||||
var cursor = editor.getCursorPosition();
|
// var cursor = editor.getCursorPosition();
|
||||||
var line = session.doc.getLine(cursor.row);
|
// var line = session.doc.getLine(cursor.row);
|
||||||
var rightChars = line.substring(cursor.column, cursor.column + 2);
|
// var rightChars = line.substring(cursor.column, cursor.column + 2);
|
||||||
if (rightChars == '</') {
|
// if (rightChars == '</') {
|
||||||
var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
|
// var indent = this.$getIndent(session.doc.getLine(cursor.row)) + session.getTabString();
|
||||||
var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
|
// var next_indent = this.$getIndent(session.doc.getLine(cursor.row));
|
||||||
|
//
|
||||||
return {
|
// return {
|
||||||
text: '\n' + indent + '\n' + next_indent,
|
// text: '\n' + indent + '\n' + next_indent,
|
||||||
selection: [1, indent.length, 1, indent.length]
|
// selection: [1, indent.length, 1, indent.length]
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return false;
|
// return false;
|
||||||
});
|
// });
|
||||||
|
|
||||||
// Check for open tag if user enters / and auto-close it.
|
// Check for open tag if user enters / and auto-close it.
|
||||||
this.add("slash", "insertion", function (state, action, editor, session, text) {
|
// this.add("slash", "insertion", function (state, action, editor, session, text) {
|
||||||
if (text == "/") {
|
// if (text == "/") {
|
||||||
var cursor = editor.getCursorPosition();
|
// var cursor = editor.getCursorPosition();
|
||||||
var line = session.doc.getLine(cursor.row);
|
// var line = session.doc.getLine(cursor.row);
|
||||||
if (cursor.column > 0 && line.charAt(cursor.column - 1) == "<") {
|
// if (cursor.column > 0 && line.charAt(cursor.column - 1) == "<") {
|
||||||
line = line.substring(0, cursor.column) + "/" + line.substring(cursor.column);
|
// line = line.substring(0, cursor.column) + "/" + line.substring(cursor.column);
|
||||||
var lines = session.doc.getAllLines();
|
// var lines = session.doc.getAllLines();
|
||||||
lines[cursor.row] = line;
|
// lines[cursor.row] = line;
|
||||||
// call mode helper to close the tag if possible
|
// // call mode helper to close the tag if possible
|
||||||
parent.exec("closeTag", lines.join(session.doc.getNewLineCharacter()), cursor.row);
|
// parent.exec("closeTag", lines.join(session.doc.getNewLineCharacter()), cursor.row);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return false;
|
// return false;
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
oop.inherits(XQueryBehaviour, Behaviour);
|
oop.inherits(XQueryBehaviour, Behaviour);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -157,7 +157,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace-tm .ace_meta.ace_tag {
|
.ace-tm .ace_meta.ace_tag {
|
||||||
color:rgb(0, 50, 198);
|
color:rgb(0, 22, 142);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ace-tm .ace_string.ace_regex {
|
.ace-tm .ace_string.ace_regex {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue