Force a horizontal align after changing the editor width
This prevents the gutter, when a long line is deleted, from forcing a scroll on the scroller element, and thus confusing the scrollbar computation. Issue #1075
Clip scrollLeft updates to max scroll pos
Prevents overcompensating when re-aligning the gutter. Closes #1074
Opera seems to have stopped flipping ctrlKey and metaKey on OS X
And promptly broke CodeMirror in the process. Issue #1050
Work around webkit bugs related to super-long lines
Pasting in a 120k-character line caused two problems - The textarea, when wrap=off is set, simply cuts off anything after char 57444. Removing the wrap attribute fixed this. - Text nodes longer then (again) 57444 seem not to be rendered beyond that character unless wrapped. A hack was added to slice up spans that were too long. Also removes the 'stop highlighting at character 5000' hack, since that appears to be the least of our worries (highlighting is much faster than rendering/layouting). Closes #1080
Fix bug in iterateBidiSections
When the from and to arguments were equal and the line had an order, it would never call the callback. Issue #1079
[markdown] Prevent leading spaces from being styled.
Regression introduced in 984e155.
Reinstate disabling highlighting on long lines
It does make a difference after all.
Fix strict mode argument redefinition warnings
Firefox complains throws warnings when "Strict Mode" is turned on. This pull request fixes two of those:
Warning: TypeError: variable data redeclares argument
Source File: chrome://sieve/content/libs/CodeMirror/lib/codemirror.js
Line: 845,Column: 8
Source Code: var data = data || measureLine(cm, line), dir = -1;
Warning: TypeError: variable spec redeclares argument
Source File: chrome://sieve/content/libs/CodeMirror/lib/codemirror.js
Line: 2870, Column: 8
Source Code: var spec = CodeMirror.resolveMode(spec);Re-focus old activeElement after patchDisplay
It may have been a widget that was removed and put back again, thus losing focus. Issue #1094
Don't thread state for stateless modes
Saves some work for modes that don't have a startState method.
Add addOverlay/removeOverlay methods
For cheaply adding extra styling without going over the whole document and doing markText. Issue #1069
Make cursor elements div instead of pre elements
There is no reason for styling intended for lines to affect the cursor.