I believe there is a problem in the comparison algorithm that keeps the two following chunks from aligning on line 2

and

The change on that line starts only on column 274 so it should align (it does in Araxis, for example).

Any thoughts? Many thanks in advance.

Code:

this.GetSelection=function(element){var range=document.selection.createRange();var length=range.text.length;range.moveStart('textedit',-1);cursorPos=range.text.length;return{start:cursorPos-length,end:cursorPos};};this.SetSelection=function(element,start,end){var range=element.createTextRange();range.collapse(true);range.moveStart('character',start);range.moveEnd('character',end-start);range.select();};var OnFocusChanged=(function(thisObj){return function(e){(function(){this.OnFocusChanged(e);}).call(thisObj);};})(this);this.InitializeOnFocusHandler=function(elem){elem.attachEvent("onfocus",OnFocusChanged);};this.OnFocusChanged=function(e){if(this.CanHaveFocus(e.srcElement)){this.CurrentFocusedElement=e.srcElement;OsStartOnChangeChecking(this.CurrentFocusedElement);} else{OsStopOnChangeChecking();this.CurrentFocusedElement=null;}};};var OsFocusBackendGecko=function(){OsFocusBaseBackend.call(this);this.base={Initialize:(function(thisObj,oldInitialize){return function(){return oldInitialize.call(thisObj);};})(this,this.Initialize)};this.GetSelection=function(element){return{start:element.selectionStart,end:element.selectionEnd};};this.SetSelection=function(element,start,end){element.setSelectionRange(start,end);};this.Initialize=function(){this.base.Initialize();var OnFocusChanged=(function(thisObj){return function(e){(function(){this.OnFocusChanged(e);}).call(thisObj);};})(this);var OnFocusLost=(function(thisObj){return function(){(function(){this.OnFocusLost();}).call(thisObj);};})(this);var OnDragDrop=(function(thisObj){return function(e){(function(){if(e.target.attributes["onosChange"]!=null) e.target.focus();}).call(thisObj);};})(this);document.addEventListener('focus',OnFocusChanged,true);document.addEventListener('blur',OnFocusLost,true);document.addEventListener('dragdrop',OnDragDrop,true);};this.CurrentFocusedElement=null;this.GetCurrentFocusedElement=function(){return this.CurrentFocusedElement;};this.OnFocusChanged=function(e){if(this.CanHaveFocus(e.target)){this.CurrentFocusedElement=e.target;OsStartOnChangeChecking(e.target);} else{OsStopOnChangeChecking();this.CurrentFocusedElement=null;}};this.OnFocusLost=function(){OsStopOnChangeChecking();this.CurrentFocusedElement=null;}};osjs(document).ready(function(){if(OsIsIE()){osAjaxBackend=new OsAjaxBackendIFrame();osFocusBackend=new OsFocusBackendIE();}else{osAjaxBackend=new OsAjaxBackendXHR();osFocusBackend=new OsFocusBackendGecko();}

Code:

this.GetSelection=function(element){var range=document.selection.createRange();var length=range.text.length;range.moveStart('textedit',-1);cursorPos=range.text.length;return{start:cursorPos-length,end:cursorPos};};this.SetSelection=function(element,start,end){var range=element.createTextRange();range.collapse(true);range.moveStart('character',start);range.moveEnd('character',end-start);range.select();};var OnFocusChanged=(function(thisObj){return function(e){(function(){this.OnFocusChanged(e);}).call(thisObj);};})(this);this.InitializeOnFocusHandler=function(elem){elem.attachEvent("onfocus",OnFocusChanged);};this.OnFocusChanged=function(e){if(this.CanHaveFocus(e.srcElement)){this.CurrentFocusedElement=e.srcElement;OsStartOnChangeChecking(this.CurrentFocusedElement);} else{OsStopOnChangeChecking();this.CurrentFocusedElement=null;}};};var OsFocusBackendGecko=function(){OsFocusBaseBackend.call(this);this.base={Initialize:(function(thisObj,oldInitialize){return function(){return oldInitialize.call(thisObj);};})(this,this.Initialize)};this.CurrentFocusedElement=null;this.GetCurrentFocusedElement=function(){return this.CurrentFocusedElement;};this.ClearFocusedElement=function(){this.CurrentFocusedElement=null;} this.GetSelection=function(element){return{start:element.selectionStart,end:element.selectionEnd};};this.SetSelection=function(element,start,end){element.setSelectionRange(start,end);};this.Initialize=function(){this.base.Initialize();var OnFocusChanged=(function(thisObj){return function(e){(function(){this.OnFocusChanged(e);}).call(thisObj);};})(this);var OnFocusLost=(function(thisObj){return function(){(function(){this.OnFocusLost();}).call(thisObj);};})(this);var OnDragDrop=(function(thisObj){return function(e){(function(){if(e.target.attributes["onosChange"]!=null) e.target.focus();}).call(thisObj);};})(this);document.addEventListener('focus',OnFocusChanged,true);document.addEventListener('blur',OnFocusLost,true);document.addEventListener('dragdrop',OnDragDrop,true);};this.OnFocusChanged=function(e){if(this.CanHaveFocus(e.target)){this.CurrentFocusedElement=e.target;OsStartOnChangeChecking(e.target);} else{OsStopOnChangeChecking();this.CurrentFocusedElement=null;}};this.OnFocusLost=function(){OsStopOnChangeChecking();this.CurrentFocusedElement=null;}};osjs(document).ready(function(){if(OsIsIE()){osAjaxBackend=new OsAjaxBackendIFrame();osFocusBackend=new OsFocusBackendIE();}else{osAjaxBackend=new OsAjaxBackendXHR();osFocusBackend=new OsFocusBackendGecko();}

Any thoughts? Many thanks in advance.

## Comment