Merge pull request #1904 from ajaxorg/small-bugs

fix several small bugs
This commit is contained in:
Lennart Kats 2014-04-10 13:51:19 +02:00
commit 2a2efb133b
36 changed files with 533 additions and 200 deletions

View file

@ -63,6 +63,7 @@ var Autocomplete = function() {
this.insertMatch();
e.stop();
}.bind(this));
this.popup.focus = this.editor.focus.bind(this.editor);
};
this.openPopup = function(editor, prefix, keepPopupPosition) {
@ -122,7 +123,10 @@ var Autocomplete = function() {
};
this.blurListener = function() {
if (document.activeElement != this.editor.textInput.getElement())
// we have to check if activeElement is a child of popup because
// on IE preventDefault doesn't stop scrollbar from being focussed
var el = document.activeElement;
if (el != this.editor.textInput.getElement() && el.parentNode != this.popup.container)
this.detach();
};

View file

@ -146,6 +146,8 @@ exports.handler = {
if (cmds.inputBuffer.idle && startCommands[key])
return startCommands[key];
var isHandled = cmds.inputBuffer.push(editor, key);
if (!isHandled && hashId !== -1)
return;
return {command: "null", passEvent: !isHandled};
} // if no modifier || shift: wait for input.
else if (key.length == 1 && (hashId === 0 || hashId == 4)) {

View file

@ -1,5 +1,7 @@
<html>
<script a='a'>var</script>'123'
<scripts>
<script a='a'>var "</scripts></script>'123'
</scripts>
<a href="abc
def">
<a href='abc

View file

@ -4,393 +4,257 @@
["variable"," --git"],
["keyword"," a/lib/ace/edit_session.js"],
["variable"," b/lib/ace/edit_session.js"]
],[
"start"
],[
"start",
["variable","index 23fc3fc..ed3b273 100644"]
],[
"start"
],[
"start",
["constant.numeric","---"],
["meta.tag"," a/lib/ace/edit_session.js"]
],[
"start"
],[
"start",
["constant.numeric","+++"],
["meta.tag"," b/lib/ace/edit_session.js"]
],[
"start"
],[
"start",
["constant","@@"],
["constant.numeric"," -51,6 +51,7 "],
["constant","@@"],
["comment.doc.tag"," var TextMode = require(\"./mode/text\").Mode;"]
],[
"start"
],[
"start",
["invisible"," var Range = require(\"./range\").Range;"]
],[
"start"
],[
"start",
["invisible"," var Document = require(\"./document\").Document;"]
],[
"start"
],[
"start",
["invisible"," var BackgroundTokenizer = require(\"./background_tokenizer\").BackgroundTokenizer;"]
],[
"start"
],[
"start",
["support.constant","+"],
["text","var SearchHighlight = require(\"./search_highlight\").SearchHighlight;"]
],[
"start"
],[
"start",
["text"," "]
],[
"start"
],[
"start",
["invisible"," /**"]
],[
"start"
],[
"start",
["invisible"," * class EditSession"]
],[
"start"
],[
"start",
["constant","@@"],
["constant.numeric"," -307,6 +308,13 "],
["constant","@@"],
["comment.doc.tag"," var EditSession = function(text, mode) {"]
],[
"start"
],[
"start",
["invisible"," return token;"]
],[
"start"
],[
"start",
["invisible"," };"]
],[
"start"
],[
"start",
["text"," "]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," this.highlight = function(re) {"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," if (!this.$searchHighlight) {"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," var highlight = new SearchHighlight(null, \"ace_selected-word\", \"text\");"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," this.$searchHighlight = this.addDynamicMarker(highlight);"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," }"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," this.$searchHighlight.setRegexp(re);"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," }"]
],[
"start"
],[
"start",
["invisible"," /**"]
],[
"start"
],[
"start",
["invisible"," * EditSession.setUndoManager(undoManager)"]
],[
"start"
],[
"start",
["invisible"," * - undoManager (UndoManager): The new undo manager"]
],[
"start"
],[
"start",
["constant","@@"],
["constant.numeric"," -556,7 +564,8 "],
["constant","@@"],
["comment.doc.tag"," var EditSession = function(text, mode) {"]
],[
"start"
],[
"start",
["invisible"," type : type || \"line\","]
],[
"start"
],[
"start",
["invisible"," renderer: typeof type == \"function\" ? type : null,"]
],[
"start"
],[
"start",
["invisible"," clazz : clazz,"]
],[
"start"
],[
"start",
["support.function","-"],
["string"," inFront: !!inFront"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," inFront: !!inFront,"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," id: id"]
],[
"start"
],[
"start",
["invisible"," }"]
],[
"start"
],[
"start",
["text"," "]
],[
"start"
],[
"start",
["invisible"," if (inFront) {"]
],[
"start"
],[
"start",
["variable","diff"],
["variable"," --git"],
["keyword"," a/lib/ace/editor.js"],
["variable"," b/lib/ace/editor.js"]
],[
"start"
],[
"start",
["variable","index 834e603..b27ec73 100644"]
],[
"start"
],[
"start",
["constant.numeric","---"],
["meta.tag"," a/lib/ace/editor.js"]
],[
"start"
],[
"start",
["constant.numeric","+++"],
["meta.tag"," b/lib/ace/editor.js"]
],[
"start"
],[
"start",
["constant","@@"],
["constant.numeric"," -494,7 +494,7 "],
["constant","@@"],
["comment.doc.tag"," var Editor = function(renderer, session) {"]
],[
"start"
],[
"start",
["invisible"," * Emitted when a selection has changed."]
],[
"start"
],[
"start",
["invisible"," **/"]
],[
"start"
],[
"start",
["invisible"," this.onSelectionChange = function(e) {"]
],[
"start"
],[
"start",
["support.function","-"],
["string"," var session = this.getSession();"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," var session = this.session;"]
],[
"start"
],[
"start",
["text"," "]
],[
"start"
],[
"start",
["invisible"," if (session.$selectionMarker) {"]
],[
"start"
],[
"start",
["invisible"," session.removeMarker(session.$selectionMarker);"]
],[
"start"
],[
"start",
["constant","@@"],
["constant.numeric"," -509,12 +509,40 "],
["constant","@@"],
["comment.doc.tag"," var Editor = function(renderer, session) {"]
],[
"start"
],[
"start",
["invisible"," this.$updateHighlightActiveLine();"]
],[
"start"
],[
"start",
["invisible"," }"]
],[
"start"
],[
"start",
["text"," "]
],[
"start"
],[
"start",
["support.function","-"],
["string"," var self = this;"]
],[
"start"
],[
"start",
["support.function","-"],
["string"," if (this.$highlightSelectedWord && !this.$wordHighlightTimer)"]
],[
"start"
],[
"start",
["support.function","-"],
["string"," this.$wordHighlightTimer = setTimeout(function() {"]
],[
"start"
],[
"start",
["support.function","-"],
["string"," self.session.$mode.highlightSelection(self);"]
],[
"start"
],[
"start",
["support.function","-"],
["string"," self.$wordHighlightTimer = null;"]
],[
"start"
],[
"start",
["support.function","-"],
["string"," }, 30, this);"]
],[
"start"
],[
"start",
["support.constant","+"],
["text"," var re = this.$highlightSelectedWord && this.$getSelectionHighLightRegexp()"]
],[
"start"
],[
"start",
["invisible"," };"]
],[
"start"
],[
"start",
["variable","diff"],
["variable"," --git"],
["keyword"," a/lib/ace/search_highlight.js"],
["variable"," b/lib/ace/search_highlight.js"]
],[
"start"
],[
"start",
["invisible","new file mode 100644"]
],[
"start"
],[
"start",
["variable","index 0000000..b2df779"]
],[
"start"
],[
"start",
["constant.numeric","---"],
["meta.tag"," /dev/null"]
],[
"start"
],[
"start",
["constant.numeric","+++"],
["meta.tag"," b/lib/ace/search_highlight.js"]
],[
"start"
],[
"start",
["constant","@@"],
["constant.numeric"," -0,0 +1,3 "],
["constant","@@"]
],[
"start"
],[
"start",
["support.constant","+"],
["text","new"]
],[
"start"
],[
"start",
["support.constant","+"],

View file

@ -0,0 +1,142 @@
[[
"start",
["comment","@these"],
["text"," "],
["comment","@are"],
["text"," "],
["comment","@tags"]
],[
"start",
["keyword","Feature:"],
["text"," Serve coffee"]
],[
"start",
["text"," Coffee should not be served until paid for"]
],[
"start",
["text"," Coffee should not be served until the button has been pressed"]
],[
"start",
["text"," If there is no coffee left then money should be refunded"]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["keyword","Scenario Outline:"],
["text"," Eating"]
],[
"start",
["text"," "],
["keyword","Given"],
["text"," there are "],
["comment","<start>"],
["text"," cucumbers"]
],[
"start",
["text"," "],
["keyword","When"],
["text"," I eat "],
["comment","<eat>"],
["text"," cucumbers"]
],[
"start",
["text"," "],
["keyword","Then"],
["text"," I should have "],
["comment","<left>"],
["text"," cucumbers"]
],[
"start"
],[
"start",
["text"," "],
["keyword","Examples:"]
],[
"start",
["text"," "],
["comment","| "],
["string","start "],
["comment","| "],
["string","eat "],
["comment","| "],
["string","left "],
["comment","|"]
],[
"start",
["text"," "],
["comment","| "],
["string"," 12 "],
["comment","| "],
["string"," 5 "],
["comment","| "],
["string"," 7 "],
["comment","|"]
],[
"start",
["text"," "],
["comment","| "],
["string"," 20 "],
["comment","| "],
["string"," 5 "],
["comment","| "],
["string"," 15 "],
["comment","| "],
["string"," "]
],[
"start"
],[
"start",
["text"," "],
["keyword","Scenario:"],
["text"," Buy last coffee"]
],[
"start",
["text"," "],
["keyword","Given"],
["text"," there are "],
["constant.numeric","1"],
["text"," coffees left in the machine"]
],[
"start",
["text"," "],
["keyword","And"],
["text"," I have deposited "],
["constant.numeric","1"],
["text","$ "]
],[
"start",
["text"," "],
["keyword","When"],
["text"," I press the coffee button"]
],[
"start",
["text"," "],
["keyword","Then"],
["text"," I should be served a "],
["string","\"coffee\""]
],[
"start",
["text"," "]
],[
"start",
["text"," "],
["comment","# this a comment"]
],[
"start",
["text"," "]
],[
"qqstring3",
["text"," "],
["string","\"\"\""]
],[
"qqstring3",
["string"," this is a "]
],[
"qqstring3",
["string"," pystring"]
],[
"start",
["string"," \"\"\""]
]]

View file

@ -3,6 +3,11 @@
["meta.tag.punctuation.tag-open.xml","<"],
["meta.tag.tag-name.xml","html"],
["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["meta.tag.punctuation.tag-open.xml","<"],
["meta.tag.tag-name.xml","scripts"],
["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["meta.tag.punctuation.tag-open.xml","<"],
@ -13,10 +18,17 @@
["string.attribute-value.xml","'a'"],
["meta.tag.punctuation.tag-close.xml",">"],
["storage.type","var"],
["text"," "],
["string","\"</scripts>"],
["meta.tag.punctuation.end-tag-open.xml","</"],
["meta.tag.script.tag-name.xml","script"],
["meta.tag.punctuation.tag-close.xml",">"],
["text.xml","'123'"]
],[
"start",
["meta.tag.punctuation.end-tag-open.xml","</"],
["meta.tag.tag-name.xml","scripts"],
["meta.tag.punctuation.tag-close.xml",">"]
],[
["string.attribute-value.xml0","tag_stuff"],
["meta.tag.punctuation.tag-open.xml","<"],

View file

@ -0,0 +1,23 @@
[[
"start",
["punctuation.definition.entity.ini","["],
["constant.section.group-title.ini",".ShellClassInfo"],
["punctuation.definition.entity.ini","]"]
],[
"start",
["keyword.other.definition.ini","IconResource"],
["punctuation.separator.key-value.ini","="],
["text","..\\logo.png"]
],[
"start",
["punctuation.definition.entity.ini","["],
["constant.section.group-title.ini","ViewState"],
["punctuation.definition.entity.ini","]"]
],[
"start",
["keyword.other.definition.ini","FolderType"],
["punctuation.separator.key-value.ini","="],
["text","Generic"]
],[
"start"
]]

View file

@ -0,0 +1,4 @@
[[
"start",
["identifier","TODO"]
]]

View file

@ -0,0 +1,4 @@
[[
"start",
["identifier","TODO"]
]]

View file

@ -297,10 +297,10 @@
["comment.doc","* Dollar quotes starting at the end of the line are colored as SQL unless"]
],[
"doc-start",
["comment.doc","* a special language tag is used. Pearl and Python are currently implemented"]
["comment.doc","* a special language tag is used. Dollar quote syntax coloring is implemented"]
],[
"doc-start",
["comment.doc","* but lots of others are possible."]
["comment.doc","* for Perl, Python, JavaScript, and Json."]
],[
"start",
["comment.doc","*/"]
@ -662,6 +662,160 @@
["statementEnd",";"]
],[
"start"
],[
"start",
["comment","-- pl/v8 (javascript)"]
],[
"javascript-start",
["keyword.statementBegin","CREATE"],
["text"," "],
["keyword","FUNCTION"],
["text"," "],
["identifier","plv8_test"],
["paren.lparen","("],
["identifier","keys"],
["text"," "],
["keyword","text"],
["text","[], "],
["identifier","vals"],
["text"," "],
["keyword","text"],
["text","[]"],
["paren.rparen",")"],
["text"," "],
["keyword","RETURNS"],
["text"," "],
["keyword","text"],
["text"," "],
["keyword","AS"],
["text"," "],
["string","$javascript$"]
],[
"javascript-start",
["storage.type","var"],
["text"," "],
["identifier","o"],
["text"," "],
["keyword.operator","="],
["text"," "],
["paren.lparen","{"],
["paren.rparen","}"],
["punctuation.operator",";"]
],[
"javascript-start",
["keyword","for"],
["paren.lparen","("],
["storage.type","var"],
["text"," "],
["identifier","i"],
["keyword.operator","="],
["constant.numeric","0"],
["punctuation.operator",";"],
["text"," "],
["identifier","i"],
["keyword.operator","<"],
["identifier","keys"],
["punctuation.operator","."],
["support.constant","length"],
["punctuation.operator",";"],
["text"," "],
["identifier","i"],
["keyword.operator","++"],
["paren.rparen",")"],
["paren.lparen","{"]
],[
"javascript-start",
["text"," "],
["identifier","o"],
["paren.lparen","["],
["identifier","keys"],
["paren.lparen","["],
["identifier","i"],
["paren.rparen","]]"],
["text"," "],
["keyword.operator","="],
["text"," "],
["identifier","vals"],
["paren.lparen","["],
["identifier","i"],
["paren.rparen","]"],
["punctuation.operator",";"]
],[
"javascript-no_regex",
["paren.rparen","}"]
],[
"javascript-start",
["keyword","return"],
["text"," "],
["variable.language","JSON"],
["punctuation.operator","."],
["identifier","stringify"],
["paren.lparen","("],
["identifier","o"],
["paren.rparen",")"],
["punctuation.operator",";"]
],[
"start",
["string","$javascript$"],
["text"," "],
["keyword","LANGUAGE"],
["text"," "],
["identifier","plv8"],
["text"," "],
["keyword","IMMUTABLE"],
["text"," "],
["keyword","STRICT"],
["statementEnd",";"]
],[
"start"
],[
"start",
["comment","-- json"]
],[
"json-start",
["keyword.statementBegin","select"],
["text"," "],
["keyword.operator","*"],
["text"," "],
["keyword","from"],
["text"," "],
["support.function","json_object_keys"],
["paren.lparen","("],
["string","$json$"]
],[
"json-start",
["paren.lparen","{"]
],[
"json-start",
["text"," "],
["variable","\"f1\""],
["text",": "],
["constant.numeric","5"],
["text",","]
],[
"json-start",
["text"," "],
["variable","\"f2\""],
["text",": "],
["string","\"test\""],
["text",","]
],[
"json-start",
["text"," "],
["variable","\"f3\""],
["text",": "],
["paren.lparen","{"],
["paren.rparen","}"]
],[
"json-start",
["paren.rparen","}"]
],[
"start",
["string","$json$"],
["paren.rparen",")"],
["statementEnd",";"]
],[
"start"
],[
"start"
],[

View file

@ -0,0 +1,98 @@
[[
"start",
["punctuation.section.embedded.begin.smarty","{"],
["keyword.control.smarty","foreach"],
["source.smarty"," "],
["punctuation.definition.variable.smarty","$"],
["variable.other.smarty","foo"],
["source.smarty"," as "],
["punctuation.definition.variable.smarty","$"],
["variable.other.smarty","bar"],
["punctuation.section.embedded.end.smarty","}"]
],[
"start",
["text.xml"," "],
["meta.tag.punctuation.tag-open.xml","<"],
["meta.tag.anchor.tag-name.xml","a"],
["text.tag-whitespace.xml"," "],
["entity.other.attribute-name.xml","href"],
["keyword.operator.attribute-equals.xml","="],
["string.attribute-value.xml","\""],
["punctuation.section.embedded.begin.smarty","{"],
["punctuation.definition.variable.smarty","$"],
["variable.other.smarty","bar"],
["source.smarty",".zig"],
["punctuation.section.embedded.end.smarty","}"],
["string.attribute-value.xml","\""],
["meta.tag.punctuation.tag-close.xml",">"],
["punctuation.section.embedded.begin.smarty","{"],
["punctuation.definition.variable.smarty","$"],
["variable.other.smarty","bar"],
["source.smarty",".zag"],
["punctuation.section.embedded.end.smarty","}"],
["meta.tag.punctuation.end-tag-open.xml","</"],
["meta.tag.anchor.tag-name.xml","a"],
["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["text.xml"," "],
["meta.tag.punctuation.tag-open.xml","<"],
["meta.tag.anchor.tag-name.xml","a"],
["text.tag-whitespace.xml"," "],
["entity.other.attribute-name.xml","href"],
["keyword.operator.attribute-equals.xml","="],
["string.attribute-value.xml","\""],
["punctuation.section.embedded.begin.smarty","{"],
["punctuation.definition.variable.smarty","$"],
["variable.other.smarty","bar"],
["source.smarty",".zig2"],
["punctuation.section.embedded.end.smarty","}"],
["string.attribute-value.xml","\""],
["meta.tag.punctuation.tag-close.xml",">"],
["punctuation.section.embedded.begin.smarty","{"],
["punctuation.definition.variable.smarty","$"],
["variable.other.smarty","bar"],
["source.smarty",".zag2"],
["punctuation.section.embedded.end.smarty","}"],
["meta.tag.punctuation.end-tag-open.xml","</"],
["meta.tag.anchor.tag-name.xml","a"],
["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["text.xml"," "],
["meta.tag.punctuation.tag-open.xml","<"],
["meta.tag.anchor.tag-name.xml","a"],
["text.tag-whitespace.xml"," "],
["entity.other.attribute-name.xml","href"],
["keyword.operator.attribute-equals.xml","="],
["string.attribute-value.xml","\""],
["punctuation.section.embedded.begin.smarty","{"],
["punctuation.definition.variable.smarty","$"],
["variable.other.smarty","bar"],
["source.smarty",".zig3"],
["punctuation.section.embedded.end.smarty","}"],
["string.attribute-value.xml","\""],
["meta.tag.punctuation.tag-close.xml",">"],
["punctuation.section.embedded.begin.smarty","{"],
["punctuation.definition.variable.smarty","$"],
["variable.other.smarty","bar"],
["source.smarty",".zag3"],
["punctuation.section.embedded.end.smarty","}"],
["meta.tag.punctuation.end-tag-open.xml","</"],
["meta.tag.anchor.tag-name.xml","a"],
["meta.tag.punctuation.tag-close.xml",">"]
],[
"start",
["punctuation.section.embedded.begin.smarty","{"],
["keyword.control.smarty","foreachelse"],
["punctuation.section.embedded.end.smarty","}"]
],[
"start",
["text.xml"," There were no rows found."]
],[
"start",
["punctuation.section.embedded.begin.smarty","{"],
["source.smarty","/"],
["keyword.control.smarty","foreach"],
["punctuation.section.embedded.end.smarty","}"]
]]

View file

@ -5,18 +5,12 @@
["text"," "],
["punctuation.definition.string.begin.asp","\""],
["string.quoted.double.asp","C:\\Wikipedia - VBScript - Example - Hello World.txt\""]
],[
"start"
],[
"start",
["text","MakeHelloWorldFile myfilename"]
],[
"start"
],[
"state_4",
["meta.leading-space"," "]
],[
"state_4"
],[
"start",
["storage.type.function.asp","Sub"],
@ -26,14 +20,10 @@
["punctuation.definition.parameters.asp","("],
["variable.parameter.function.asp","FileName"],
["punctuation.definition.parameters.asp",")"]
],[
"start"
],[
"start",
["punctuation.definition.comment.asp","'"],
["comment.line.apostrophe.asp","Create a new file in C: drive or overwrite existing file"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -47,8 +37,6 @@
["punctuation.definition.string.begin.asp","\""],
["string.quoted.double.asp","Scripting.FileSystemObject\""],
["text",")"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -59,8 +47,6 @@
["text","(FileName) "],
["keyword.control.asp","Then"],
["text"," "]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -81,8 +67,6 @@
["punctuation.definition.string.begin.asp","\""],
["string.quoted.double.asp"," exists ... OK to overwrite?\""],
["text",", vbOKCancel)"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -90,8 +74,6 @@
["meta.odd-tab.spaces"," "],
["punctuation.definition.comment.asp","'"],
["comment.line.apostrophe.asp","If button selected is not OK, then quit now"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -99,8 +81,6 @@
["meta.odd-tab.spaces"," "],
["punctuation.definition.comment.asp","'"],
["comment.line.apostrophe.asp","vbOK is a language constant"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -113,15 +93,11 @@
["keyword.control.asp","Then"],
["text"," "],
["keyword.control.asp","Exit Sub"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
["meta.leading-space"," "],
["keyword.control.asp","Else"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -129,8 +105,6 @@
["meta.odd-tab.spaces"," "],
["punctuation.definition.comment.asp","'"],
["comment.line.apostrophe.asp","Confirm OK to create"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -151,8 +125,6 @@
["punctuation.definition.string.begin.asp","\""],
["string.quoted.double.asp"," ... OK to create?\""],
["text",", vbOKCancel)"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -165,23 +137,17 @@
["keyword.control.asp","Then"],
["text"," "],
["keyword.control.asp","Exit Sub"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
["meta.leading-space"," "],
["keyword.control.asp","End If"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
["meta.leading-space"," "],
["punctuation.definition.comment.asp","'"],
["comment.line.apostrophe.asp","Create new file (or replace an existing file)"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -190,8 +156,6 @@
["text"," FileObject "],
["keyword.operator.asp","="],
["text"," FSO.CreateTextFile (FileName)"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -204,8 +168,6 @@
["text"," "],
["support.function.vb.asp","Now"],
["text","()"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -213,8 +175,6 @@
["text","FileObject.WriteLine "],
["punctuation.definition.string.begin.asp","\""],
["string.quoted.double.asp","Hello World\""]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -222,8 +182,6 @@
["text","FileObject."],
["entity.name.function.asp","Close"],
["text","()"]
],[
"start"
],[
"start",
["meta.odd-tab.spaces"," "],
@ -239,8 +197,6 @@
["text"," "],
["punctuation.definition.string.begin.asp","\""],
["string.quoted.double.asp"," ... updated.\""]
],[
"start"
],[
"start",
["support.function.asp","End"],

View file

@ -629,7 +629,7 @@ PHP.Lexer = function( src, ini ) {
},
{
value: PHP.Constants.T_VARIABLE,
re: /^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
re: /^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/
},
{
value: PHP.Constants.T_WHITESPACE,
@ -648,7 +648,7 @@ PHP.Lexer = function( src, ini ) {
return result;
}
var match = result.match( /(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/g );
var match = result.match( /(?:[^\\]|\\.)*[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/g );
if ( match !== null ) {
// string has a variable
@ -675,7 +675,7 @@ PHP.Lexer = function( src, ini ) {
}
match = result.match(/^\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/);
match = result.match(/^\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/);
@ -689,7 +689,7 @@ PHP.Lexer = function( src, ini ) {
result = result.substring( match[ 0 ].length );
match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*(\()/);
match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)\s*(\()/);
if ( match !== null ) {
@ -719,7 +719,7 @@ PHP.Lexer = function( src, ini ) {
if ( curlyOpen > 0) {
re = /^([^\\\$"{}\]\)]|\\.)+/g;
} else {
re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\xff]))+/g;;
re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\uffff]))+/g;;
}
while(( match = result.match( re )) !== null ) {
@ -756,7 +756,7 @@ PHP.Lexer = function( src, ini ) {
if (len === result.length) {
// nothing has been found yet
if ((match = result.match( /^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)/g )) !== null) {
if ((match = result.match( /^(([^\\]|\\.)*?[^\\]\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*)/g )) !== null) {
return;
}
}
@ -786,7 +786,7 @@ PHP.Lexer = function( src, ini ) {
},
{
value: PHP.Constants.T_STRING,
re: /^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
re: /^[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/
},
{
value: -1,

View file

@ -969,11 +969,11 @@ var PhpLangHighlightRules = function() {
else if (value == "debugger")
return "invalid.deprecated";
else
if(value.match(/^(\$[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*|self|parent)$/))
if(value.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/))
return "variable";
return "identifier";
},
regex : "[a-zA-Z_$\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*\\b"
regex : /[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/
}, {
onMatch : function(value, currentSate, state) {
value = value.substr(3);

View file

@ -206,7 +206,7 @@ var XmlHighlightRules = function(normalize) {
this.embedTagRules = function(HighlightRules, prefix, tag){
this.$rules.tag.unshift({
token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
regex : "(<)(" + tag + ")",
regex : "(<)(" + tag + "(?=\\s|>|$))",
next: [
{include : "attributes"},
{token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"}
@ -224,7 +224,7 @@ var XmlHighlightRules = function(normalize) {
this.embedRules(HighlightRules, prefix, [{
token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"],
regex : "(</)(" + tag + ")",
regex : "(</)(" + tag + "(?=\\s|>|$))",
next: tag + "-end"
}, {
token: "string.cdata.xml",

View file

@ -45,7 +45,9 @@ var MouseHandler = function(editor) {
new DefaultHandlers(this);
new DefaultGutterHandler(this);
new DragdropHandler(this);
var focusEditor = function(e) { editor.focus() };
var mouseTarget = editor.renderer.getMouseEventTarget();
event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
event.addListener(mouseTarget, "mousemove", this.onMouseMove.bind(this, "mousemove"));
@ -53,6 +55,10 @@ var MouseHandler = function(editor) {
if (editor.renderer.scrollBarV) {
event.addMultiMouseDownListener(editor.renderer.scrollBarV.inner, [400, 300, 250], this, "onMouseEvent");
event.addMultiMouseDownListener(editor.renderer.scrollBarH.inner, [400, 300, 250], this, "onMouseEvent");
if (useragent.isIE) {
event.addListener(editor.renderer.scrollBarV.element, "mousedown", focusEditor);
event.addListener(editor.renderer.scrollBarH.element, "mousemove", focusEditor);
}
}
event.addMouseWheelListener(editor.container, this.onMouseWheel.bind(this, "mousewheel"));
@ -62,9 +68,7 @@ var MouseHandler = function(editor) {
event.addListener(gutterEl, "dblclick", this.onMouseEvent.bind(this, "gutterdblclick"));
event.addListener(gutterEl, "mousemove", this.onMouseEvent.bind(this, "guttermousemove"));
event.addListener(mouseTarget, "mousedown", function(e) {
editor.focus();
});
event.addListener(mouseTarget, "mousedown", focusEditor);
event.addListener(gutterEl, "mousedown", function(e) {
editor.focus();

View file

@ -0,0 +1,7 @@
define(function(require, exports, module) {
"use strict";
exports.snippetText = require("../requirejs/text!./_all_modes.snippets");
exports.scope = "_all_modes";
});

View file

View file

@ -0,0 +1,7 @@
define(function(require, exports, module) {
"use strict";
exports.snippetText = require("../requirejs/text!./all_modes.snippets");
exports.scope = "all_modes";
});

View file

View file

@ -0,0 +1,7 @@
define(function(require, exports, module) {
"use strict";
exports.snippetText = require("../requirejs/text!./cirru.snippets");
exports.scope = "cirru";
});

View file

View file

@ -0,0 +1,7 @@
define(function(require, exports, module) {
"use strict";
exports.snippetText = require("../requirejs/text!./gherkin.snippets");
exports.scope = "gherkin";
});

View file

7
lib/ace/snippets/jack.js Normal file
View file

@ -0,0 +1,7 @@
define(function(require, exports, module) {
"use strict";
exports.snippetText = require("../requirejs/text!./jack.snippets");
exports.scope = "jack";
});

View file

7
lib/ace/snippets/mel.js Normal file
View file

@ -0,0 +1,7 @@
define(function(require, exports, module) {
"use strict";
exports.snippetText = require("../requirejs/text!./mel.snippets");
exports.scope = "mel";
});

View file

View file

@ -0,0 +1,7 @@
define(function(require, exports, module) {
"use strict";
exports.snippetText = require("../requirejs/text!./plain_text.snippets");
exports.scope = "plain_text";
});

View file

View file

View file

@ -0,0 +1,7 @@
define(function(require, exports, module) {
"use strict";
exports.snippetText = require("../requirejs/text!./smarty.snippets");
exports.scope = "smarty";
});

View file

View file

@ -0,0 +1,7 @@
define(function(require, exports, module) {
"use strict";
exports.snippetText = require("../requirejs/text!./space.snippets");
exports.scope = "space";
});

View file

View file

@ -34,6 +34,7 @@ define(function(require, exports, module) {
var oop = require("./lib/oop");
var dom = require("./lib/dom");
var config = require("./config");
var useragent = require("./lib/useragent");
var GutterLayer = require("./layer/gutter").Gutter;
var MarkerLayer = require("./layer/marker").Marker;
var TextLayer = require("./layer/text").Text;
@ -71,7 +72,7 @@ var VirtualRenderer = function(container, theme) {
// dom.importCssString(editorCss, "ace_editor", container.ownerDocument);
// in IE <= 9 the native cursor always shines through
this.$keepTextAreaAtCursor = true;
this.$keepTextAreaAtCursor = !useragent.isOldIE;
dom.addCssClass(this.container, "ace_editor");