fixed plugins
This commit is contained in:
parent
c37c48cd12
commit
9be69ef258
|
@ -1719,8 +1719,8 @@ function Ace2Inner(){
|
|||
root:root,
|
||||
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
|
||||
|
@ -3628,16 +3628,15 @@ function Ace2Inner(){
|
|||
* This hook is provided to allow a plugin to handle key events.
|
||||
* 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,
|
||||
|
|
|
@ -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)
|
||||
|
@ -409,7 +411,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
|||
if (endPoint && node == endPoint.node)
|
||||
{
|
||||
selEnd = _pointHere(0, state);
|
||||
}
|
||||
}
|
||||
}
|
||||
while (txt.length > 0)
|
||||
{
|
||||
|
@ -476,8 +478,7 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
|||
* The return value should be either true(break the line) or false.
|
||||
*
|
||||
*/
|
||||
{
|
||||
cc.startNewLine(state);
|
||||
{
|
||||
this.breakLine = true;
|
||||
var tvalue = dom.nodeAttr(node, 'value');
|
||||
var induceLineBreak = hooks.callAll('collectContentLineBreak', {
|
||||
|
@ -487,8 +488,9 @@ function makeContentCollector(collectStyles, browser, apool, domInterface, class
|
|||
tvalue:tvalue,
|
||||
styl: null,
|
||||
cls: null
|
||||
});
|
||||
if(induceLineBreak){
|
||||
});
|
||||
var startNewLine= (typeof(induceLineBreak)=='object'&&induceLineBreak.length==0)?true:induceLineBreak[0];
|
||||
if(startNewLine){
|
||||
cc.startNewLine(state);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue