From 0b4c56c5a75129ec59b99827e3a12354379c31b1 Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 11 Aug 2013 14:53:01 +0400 Subject: [PATCH 1/3] fix string parsing in php worker --- lib/ace/mode/php/php.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/ace/mode/php/php.js b/lib/ace/mode/php/php.js index de5e5a99..67346058 100644 --- a/lib/ace/mode/php/php.js +++ b/lib/ace/mode/php/php.js @@ -689,7 +689,7 @@ PHP.Lexer = function( src, ini ) { result = result.substring( match[ 0 ].length ); - match = result.match(/^(\-\>)([a-zA-Z0-9_\x7f-\xff]*)/); + match = result.match(/^(\-\>)\s*([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)\s*(\()/); if ( match !== null ) { @@ -703,6 +703,9 @@ PHP.Lexer = function( src, ini ) { match[ 2 ], line ]); + if (match[3]) { + results.push(match[3]); + } result = result.substring( match[ 0 ].length ); } @@ -714,9 +717,9 @@ PHP.Lexer = function( src, ini ) { var re; if ( curlyOpen > 0) { - re = /^([^\\\$"{}\]]|\\.)+/g; + re = /^([^\\\$"{}\]\)]|\\.)+/g; } else { - re = /^([^\\\$"{]|\\.|{[^\$])+/g; + re = /^([^\\\$"{]|\\.|{[^\$]|\$(?=[^a-zA-Z_\x7f-\xff]))+/g;; } while(( match = result.match( re )) !== null ) { From 2ace399a8a299fa50c5e71b5cc36cd422df3d72f Mon Sep 17 00:00:00 2001 From: nightwing Date: Sun, 11 Aug 2013 14:53:48 +0400 Subject: [PATCH 2/3] better compositionUpdate on chrome --- lib/ace/keyboard/textinput.js | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lib/ace/keyboard/textinput.js b/lib/ace/keyboard/textinput.js index 802b9236..f0830e71 100644 --- a/lib/ace/keyboard/textinput.js +++ b/lib/ace/keyboard/textinput.js @@ -51,7 +51,7 @@ var TextInput = function(parentNode, host) { text.autocapitalize = "off"; text.spellcheck = false; - text.style.bottom = "2000em"; + text.style.opacity = "0"; parentNode.insertBefore(text, parentNode.firstChild); var PLACEHOLDER = "\x01\x01"; @@ -372,10 +372,13 @@ var TextInput = function(parentNode, host) { var onCompositionUpdate = function() { // console.log("onCompositionUpdate", inComposition && JSON.stringify(text.value)) if (!inComposition) return; - host.onCompositionUpdate(text.value); + var val = text.value.replace(/\x01/g, ""); + if (inComposition.lastValue === val) return; + + host.onCompositionUpdate(val); if (inComposition.lastValue) host.undo(); - inComposition.lastValue = text.value.replace(/\x01/g, "") + inComposition.lastValue = val; if (inComposition.lastValue) { var r = host.selection.getRange(); host.insert(inComposition.lastValue); @@ -424,7 +427,12 @@ var TextInput = function(parentNode, host) { var syncComposition = lang.delayedCall(onCompositionUpdate, 50); event.addListener(text, "compositionstart", onCompositionStart); - event.addListener(text, useragent.isGecko ? "text" : "keyup", function(){syncComposition.schedule()}); + if (useragent.isGecko) { + event.addListener(text, "text", function(){syncComposition.schedule()}); + } else { + event.addListener(text, "keyup", function(){syncComposition.schedule()}); + event.addListener(text, "keydown", function(){syncComposition.schedule()}); + } event.addListener(text, "compositionend", onCompositionEnd); this.getElement = function() { From df4b0c8d4c23bca02d3f764324306b6cff195cb9 Mon Sep 17 00:00:00 2001 From: nightwing Date: Wed, 18 Sep 2013 18:45:29 +0400 Subject: [PATCH 3/3] update site --- index.html | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/index.html b/index.html index a33f0e03..f2a26c2c 100644 --- a/index.html +++ b/index.html @@ -784,16 +784,15 @@ if (match) { style="left: 10px; top: -4px; width:80px" /> Wolf CMS +
  • + + WikipediA +
  • Codiad
  • -
  • - - Fine Cut Engine -
  • Drive Notepad
  • +
  • + + Fine Cut Engine +
  • @@ -962,10 +966,6 @@ if (match) { style="left: 12px; width: 79px;top: -18px;"> Divshot
  • -
  • - - Codio -