Le Mardi 30 Mars 2010 13:00:04, KSChan a écrit : > Yannick, Hi Kschan,
> > Regarding the long file issue (/es/appendices/ini.xml). > > I spent some time on the codemirror source and find that ... > > The options lineNumberDelay and lineNumberTime are not valid for the case > when option "textWrapping = false" (which is our FilePanel default). > > The operation for adding lineNumber to the editor is just a simple > while-loop. This while-looop is the cause of freezing the browser when > opening a long file like the /es/appendices/ini.xml > > There are 2 solutions.. > > [1] when a long file is detected, disable the line number in the editor... > tested ... just look not nice without the line numbers > > [2] modify the while loop so that the options lineNumberDelay and > lineNumberTime are valid (using setTimeout which "sleep" the while loop)... > tested ... look nice but have drawback. > > Drawback for solu-2: > > When scrolling to the bottom immediately after the open (ctrl + end), line > numbers displayed are incorrect. This issue will also occur for > "textWrapping = true" line-number implementation (u may see the effect by > simply modify /js/ux/others/main_specific/Ext.ux.CodeMirror.js line 145 - > textWrapping: true and scroll to bottom after open immediately) > > Kindly let me know ... which solu we should use. The solution 2 seems to be Ok for me. Seen your skill in this editor, I trust in you ;) If you think this is the best solution, just do it ;) Best, Yannick > > kschan.