From 4af37cd7225b8c813a6d495a3a1e7d2ea9f1840b Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 15 Mar 2015 13:19:06 +0400 Subject: [PATCH 1/7] fix #2395 context menu regression in Firefox on mac --- lib/ace/keyboard/textinput.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index 38fe0923..0bd57eed 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -76,6 +76,7 @@ var TextInput = function(parentNode, host) { resetSelection(); }); this.focus = function() { + if (tempStyle) return text.focus(); text.style.position = "fixed"; text.style.top = "-1000px"; text.focus(); From d9db9031902a5b1bd18a11ce6b4f0e662ccb7d5b Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 15 Mar 2015 14:14:12 +0400 Subject: [PATCH 2/7] update rust mode --- lib/ace/mode/rust_highlight_rules.js | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/lib/ace/mode/rust_highlight_rules.js b/lib/ace/mode/rust_highlight_rules.js index d1290fa3..181cf11a 100644 --- a/lib/ace/mode/rust_highlight_rules.js +++ b/lib/ace/mode/rust_highlight_rules.js @@ -36,6 +36,7 @@ define(function(require, exports, module) { var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var stringEscape = /\\(?:[nrt0'"]|x[\da-fA-F]{2}|u\{[\da-fA-F]{6}\})/.source; var RustHighlightRules = function() { // regexp must not have capturing parentheses. Use (?:) instead. // regexps are ordered -> the first match is used @@ -44,13 +45,7 @@ var RustHighlightRules = function() { [ { token: 'variable.other.source.rust', regex: '\'[a-zA-Z_][a-zA-Z0-9_]*[^\\\']' }, { token: 'string.quoted.single.source.rust', - regex: '\'', - push: - [ { token: 'string.quoted.single.source.rust', - regex: '\'', - next: 'pop' }, - { include: '#rust_escaped_character' }, - { defaultToken: 'string.quoted.single.source.rust' } ] }, + regex: "'(?:[^'\\\\]|" + stringEscape + ")'" }, { stateName: "bracketedComment", onMatch : function(value, currentState, stack){ @@ -86,14 +81,15 @@ var RustHighlightRules = function() { [ { token: 'string.quoted.double.source.rust', regex: '"', next: 'pop' }, - { include: '#rust_escaped_character' }, + { token: 'constant.character.escape.source.rust', + regex: stringEscape }, { defaultToken: 'string.quoted.double.source.rust' } ] }, { token: [ 'keyword.source.rust', 'meta.function.source.rust', 'entity.name.function.source.rust', 'meta.function.source.rust' ], regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' }, { token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' }, { token: 'keyword.source.rust', - regex: '\\b(?:as|assert|break|claim|const|copy|Copy|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' }, + regex: '\\b(?:as|assert|break|claim|const|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' }, { token: 'storage.type.source.rust', regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|isize|usize|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' }, { token: 'variable.language.source.rust', regex: '\\bself\\b' }, @@ -137,10 +133,7 @@ var RustHighlightRules = function() { { token: 'comment.end.block.source.rust', regex: '\\*/', next: 'pop' }, - { defaultToken: 'comment.block.source.rust' } ] } ], - '#rust_escaped_character': - [ { token: 'constant.character.escape.source.rust', - regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' } ] } + { defaultToken: 'comment.block.source.rust' } ] } ] } this.normalizeRules(); }; From a78bf8e5efe88c81812e3e883c500ab209d1f9e5 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 15 Mar 2015 14:55:52 +0400 Subject: [PATCH 3/7] update links to emmet.js --- demo/emmet.html | 2 +- demo/kitchen-sink/demo.js | 2 +- doc/site/js/main.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/demo/emmet.html b/demo/emmet.html index 122085d9..bd0d4abe 100644 --- a/demo/emmet.html +++ b/demo/emmet.html @@ -23,7 +23,7 @@

 
 
-
+