fixed plugins

This commit is contained in:
Gedion 2012-09-11 16:21:14 -05:00
parent c37c48cd12
commit 9be69ef258
3 changed files with 22 additions and 14 deletions

View File

@ -1720,7 +1720,7 @@ function Ace2Inner(){
point:selection.startPoint,
documentAttributeManager: documentAttributeManager
});
selStart = selStartFromHook || getLineAndCharForPoint(selection.startPoint);
selStart = (selStartFromHook==null||selStartFromHook.length==0)?getLineAndCharForPoint(selection.startPoint):selStartFromHook;
}
if (selection && !selEnd)
{
@ -1746,7 +1746,7 @@ function Ace2Inner(){
point:selection.endPoint,
documentAttributeManager: documentAttributeManager
});
selEnd = selEndFromHook || getLineAndCharForPoint(selection.endPoint);
selEnd = (selEndFromHook==null||selEndFromHook.length==0)?getLineAndCharForPoint(selection.endPoint):selEndFromHook;
}
// selection from content collection can, in various ways, extend past final
@ -3629,15 +3629,14 @@ function Ace2Inner(){
* The return value should true if you have handled the event.
*
*/
editorInfo.specialHandled = null;
specialHandled = hooks.callAll('aceKeyEvent', {
var specialHandledInHook = hooks.callAll('aceKeyEvent', {
callstack: currentCallStack,
editorInfo: editorInfo,
rep: rep,
documentAttributeManager: documentAttributeManager,
evt:evt
});
specialHandled = (specialHandledInHook&&specialHandledInHook.length>0)?specialHandledInHook[0]:specialHandled;
if ((!specialHandled) && isTypeForSpecialKey && keyCode == 8)
{
// "delete" key; in mozilla, if we're at the beginning of a line, normalize now,

View File

@ -388,6 +388,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
* The return value should be the validated/manipulated text.
*
*/
//top.console.log(' nodevalue ',txt);
var txtFromHook = hooks.callAll('collectContentLineText', {
cc: this,
state: state,
@ -397,7 +398,8 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
styl: null,
cls: null
});
var txt = txtFromHook||txt;
var txt = (typeof(txtFromHook)=='object'&&txtFromHook.length==0)?dom.nodeValue(node):txtFromHook[0];
var rest = '';
var x = 0; // offset into original text
if (txt.length == 0)
@ -477,7 +479,6 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
*
*/
{
cc.startNewLine(state);
this.breakLine = true;
var tvalue = dom.nodeAttr(node, 'value');
var induceLineBreak = hooks.callAll('collectContentLineBreak', {
@ -488,7 +489,8 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
styl: null,
cls: null
});
if(induceLineBreak){
var startNewLine= (typeof(induceLineBreak)=='object'&&induceLineBreak.length==0)?true:induceLineBreak[0];
if(startNewLine){
cc.startNewLine(state);
}
}

View File

@ -146,9 +146,16 @@ linestylefilter.getLineStyleFilter = function(lineLength, aline, textAndClassFun
return function(txt, cls)
{
var disableAuthColorForThisLine = hooks.callAll("disableAuthorColorsForThisLine", {
linestylefilter: linestylefilter,
text: txt,
class: cls
}, " ", " ", "");
var disableAuthors = (disableAuthColorForThisLine==null||disableAuthColorForThisLine.length==0)?false:disableAuthColorForThisLine[0];
while (txt.length > 0)
{
if (leftInAuthor <= 0)
if (leftInAuthor <= 0 || disableAuthors)
{
// prevent infinite loop if something funny's going on
return nextAfterAuthorColors(txt, cls);